|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.scoping.impl.FilteringScope
public class FilteringScope
A FilteringScope filters out all IEObjectDescription
for which
the given predicate returns false
.
Field Summary |
---|
Fields inherited from interface org.eclipse.xtext.scoping.IScope |
---|
NULLSCOPE |
Constructor Summary | |
---|---|
FilteringScope(IScope delegate,
com.google.common.base.Predicate<IEObjectDescription> filter)
|
Method Summary | |
---|---|
java.lang.Iterable<IEObjectDescription> |
getAllElements()
Obtain all elements from the scope. |
java.lang.Iterable<IEObjectDescription> |
getElements(org.eclipse.emf.ecore.EObject object)
Find all descriptions that match the given instance. |
java.lang.Iterable<IEObjectDescription> |
getElements(QualifiedName name)
Find all descriptions that match the given name. |
protected IEObjectDescription |
getFirst(java.lang.Iterable<IEObjectDescription> elements)
|
IEObjectDescription |
getSingleElement(org.eclipse.emf.ecore.EObject object)
Find the first description that matches the given instance. |
IEObjectDescription |
getSingleElement(QualifiedName name)
Find the first description that matches the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilteringScope(IScope delegate, com.google.common.base.Predicate<IEObjectDescription> filter)
Method Detail |
---|
public java.lang.Iterable<IEObjectDescription> getAllElements()
IScope
UnsupportedOperationException
if the scope cannot be enumerated.
getAllElements
in interface IScope
null
.public java.lang.Iterable<IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object)
IScope
getElements
in interface IScope
object
- the instance whose descriptions should be obtained. May not be null
.
instance
. Never null
.public java.lang.Iterable<IEObjectDescription> getElements(QualifiedName name)
IScope
getElements
in interface IScope
name
- the name of the to-be-found elements. May not be null
.
name
. Never null
.public IEObjectDescription getSingleElement(org.eclipse.emf.ecore.EObject object)
IScope
getSingleElement
in interface IScope
object
- the instance whose description should be obtained. May not be null
.
instance
. May be null
.public IEObjectDescription getSingleElement(QualifiedName name)
IScope
getSingleElement
in interface IScope
name
- the name of the to-be-found element. May not be null
.
name
. May be null
.protected IEObjectDescription getFirst(java.lang.Iterable<IEObjectDescription> elements)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |