public class Scopes
extends java.lang.Object
IScope
and IEObjectDescription
Constructor and Description |
---|
Scopes() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Iterable<IEObjectDescription> |
filterDuplicates(java.lang.Iterable<IEObjectDescription> filtered) |
static com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> |
index(java.lang.Iterable<IEObjectDescription> descriptions)
indexes the IEObject description using the given
|
static <T> com.google.common.collect.Multimap<T,IEObjectDescription> |
index(java.lang.Iterable<IEObjectDescription> descriptions,
com.google.common.base.Function<IEObjectDescription,T> indexer)
indexes the IEObject description using the given
|
static java.lang.Iterable<IEObjectDescription> |
scopedElementsFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
transforms an
Iterable of EObject s into an Iterable of IEObjectDescription s computing
the EAttribute 'name' to compute the IEObjectDescription 's name. |
static <T extends org.eclipse.emf.ecore.EObject> |
scopedElementsFor(java.lang.Iterable<? extends T> elements,
com.google.common.base.Function<T,QualifiedName> nameComputation)
transforms an
Iterable of EObject s into an Iterable of IEObjectDescription s computing
the name of the elements using the passed Function If the passed function returns null the object is
filtered out. |
static IScope |
scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
creates a scope using
SimpleAttributeResolver.NAME_RESOLVER to compute the names and sets
IScope.NULLSCOPE as parent scope |
static IScope |
scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements,
IScope outer)
creates a scope using
SimpleAttributeResolver.NAME_RESOLVER to compute the names |
static <T extends org.eclipse.emf.ecore.EObject> |
scopeFor(java.lang.Iterable<? extends T> elements,
com.google.common.base.Function<T,QualifiedName> nameComputation,
IScope outer)
creates a scope using the passed function to compute the names and sets the passed scope as the parent scope
|
static java.lang.Iterable<IEObjectDescription> |
selectCompatible(java.lang.Iterable<IEObjectDescription> exportedObjects,
org.eclipse.emf.ecore.EClass clazz) |
public static java.lang.Iterable<IEObjectDescription> selectCompatible(java.lang.Iterable<IEObjectDescription> exportedObjects, org.eclipse.emf.ecore.EClass clazz)
public static IScope scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
SimpleAttributeResolver.NAME_RESOLVER
to compute the names and sets
IScope.NULLSCOPE
as parent scopepublic static IScope scopeFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements, IScope outer)
SimpleAttributeResolver.NAME_RESOLVER
to compute the namespublic static <T extends org.eclipse.emf.ecore.EObject> IScope scopeFor(java.lang.Iterable<? extends T> elements, com.google.common.base.Function<T,QualifiedName> nameComputation, IScope outer)
public static java.lang.Iterable<IEObjectDescription> scopedElementsFor(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> elements)
Iterable
of EObject
s into an Iterable
of IEObjectDescription
s computing
the EAttribute
'name' to compute the IEObjectDescription
's name. If not existent the object is
filtered out.public static <T extends org.eclipse.emf.ecore.EObject> java.lang.Iterable<IEObjectDescription> scopedElementsFor(java.lang.Iterable<? extends T> elements, com.google.common.base.Function<T,QualifiedName> nameComputation)
Iterable
of EObject
s into an Iterable
of IEObjectDescription
s computing
the name of the elements using the passed Function
If the passed function returns null the object is
filtered out.public static <T> com.google.common.collect.Multimap<T,IEObjectDescription> index(java.lang.Iterable<IEObjectDescription> descriptions, com.google.common.base.Function<IEObjectDescription,T> indexer)
public static com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> index(java.lang.Iterable<IEObjectDescription> descriptions)
public static java.lang.Iterable<IEObjectDescription> filterDuplicates(java.lang.Iterable<IEObjectDescription> filtered)