@Override public IEObjectDescription getSingleElement(EObject object) { return delegate.getSingleElement(object); }
@Override public IEObjectDescription getSingleElement(QualifiedName name) { return getSingleElement(name, false); }
@Override public IEObjectDescription getSingleElement(EObject object) { return typeScope.getSingleElement(object); }
@Override public IEObjectDescription getSingleElement(QualifiedName name) { return getSingleElement(name, false); }
@Override public Iterable<IEObjectDescription> getElements(QualifiedName name) { IEObjectDescription result = getSingleElement(name); if (result != null) return singleton(result); return emptySet(); }
@Override public Iterable<IEObjectDescription> getElements(QualifiedName name) { IEObjectDescription result = getSingleElement(name); if (result != null) return singleton(result); return emptySet(); }
@Override public IEObjectDescription getSingleElement(QualifiedName name) { if (isFiltered(name)) { return null; } return delegate.getSingleElement(name); }
@Override public IEObjectDescription getSingleElement(QualifiedName name, boolean binary) { if (isFiltered(name)) { return null; } return delegate.getSingleElement(name, binary); }
@Override public IEObjectDescription getSingleElement(QualifiedName name) { if (isPrimitive(name)) { return typeScope.getSingleElement(name, true); } return parent.getSingleElement(name); }
@Override public Iterable<IEObjectDescription> getElements(final QualifiedName name) { IEObjectDescription typeDescription = typeScope.getSingleElement(name); if (typeDescription == null) return emptySet(); JvmType type = (JvmType) typeDescription.getEObjectOrProxy(); if (type.eIsProxy() || !(type instanceof JvmGenericType)) { return emptySet(); } final JvmGenericType castedType = (JvmGenericType) type; if (castedType.isInterface()) { return emptySet(); } Iterable<JvmConstructor> constructors = new Iterable<JvmConstructor>() { public Iterator<JvmConstructor> iterator() { return castedType.getDeclaredConstructors().iterator(); } }; return transform(constructors, new Function<JvmConstructor,IEObjectDescription>(){ public IEObjectDescription apply(JvmConstructor from) { return EObjectDescription.create(name, from); } }); }
@Override public Iterable<IEObjectDescription> getElements(final QualifiedName name) { IEObjectDescription typeDescription = typeScope.getSingleElement(name); if (typeDescription == null) return emptySet(); JvmType type = (JvmType) typeDescription.getEObjectOrProxy(); if (type.eIsProxy() || !(type instanceof JvmGenericType)) { return emptySet(); } final JvmGenericType castedType = (JvmGenericType) type; if (castedType.isInterface()) { return emptySet(); } Iterable<JvmConstructor> constructors = new Iterable<JvmConstructor>() { @Override public Iterator<JvmConstructor> iterator() { return castedType.getDeclaredConstructors().iterator(); } }; return transform(constructors, new Function<JvmConstructor,IEObjectDescription>(){ @Override public IEObjectDescription apply(JvmConstructor from) { return EObjectDescription.create(name, from); } }); }
@Override public IEObjectDescription getSingleElement(QualifiedName name, boolean binary) { importedNames.add(name.toLowerCase()); IEObjectDescription element = typeScope.getSingleElement(name, binary); if (element == null) { ClassNameVariants nameVariants = new ClassNameVariants(name.toString()); while (nameVariants.hasNext()) { String nextVariant = nameVariants.next(); importedNames.add(getQualifiedNameConverter().toQualifiedName(nextVariant).toLowerCase()); } } return element; }
@Override public IEObjectDescription getSingleElement(QualifiedName name) { importedNames.add(name.toLowerCase()); IEObjectDescription element = typeScope.getSingleElement(name); if (element == null) { ClassNameVariants nameVariants = new ClassNameVariants(name.toString()); while (nameVariants.hasNext()) { String nextVariant = nameVariants.next(); importedNames.add(getQualifiedNameConverter().toQualifiedName(nextVariant).toLowerCase()); } } return element; }