org.eclipse.xtext.common.types.xtext
Class AbstractTypeScope
java.lang.Object
org.eclipse.xtext.scoping.impl.AbstractScope
org.eclipse.xtext.common.types.xtext.AbstractTypeScope
- All Implemented Interfaces:
- IScope
- Direct Known Subclasses:
- ClasspathBasedTypeScope, JdtBasedSimpleTypeScope
public abstract class AbstractTypeScope
- extends AbstractScope
A scope that provides access to types
.
Case insensitivity is not supported. It's always the most outer scope.
- Author:
- Sebastian Zarnekow - Initial contribution and API, Jan Koehnlein - introduced QualifiedName
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractTypeScope
protected AbstractTypeScope(IJvmTypeProvider typeProvider,
IQualifiedNameConverter qualifiedNameConverter,
com.google.common.base.Predicate<IEObjectDescription> filter)
getSingleElement
public IEObjectDescription getSingleElement(QualifiedName name)
- Description copied from interface:
IScope
- Find the first description that matches the given name.
- Specified by:
getSingleElement
in interface IScope
- Overrides:
getSingleElement
in class AbstractScope
- Parameters:
name
- the name of the to-be-found element. May not be null
.
- Returns:
- the first element that matches the
name
. May be null
.
getElements
public java.lang.Iterable<IEObjectDescription> getElements(QualifiedName name)
- Description copied from interface:
IScope
- Find all descriptions that match the given name.
- Specified by:
getElements
in interface IScope
- Overrides:
getElements
in class AbstractScope
- Parameters:
name
- the name of the to-be-found elements. May not be null
.
- Returns:
- all elements that match the
name
. Never null
.
getElements
public java.lang.Iterable<IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object)
- Description copied from interface:
IScope
- Find all descriptions that match the given instance.
- Specified by:
getElements
in interface IScope
- Overrides:
getElements
in class AbstractScope
- Parameters:
object
- the instance whose descriptions should be obtained. May not be null
.
- Returns:
- all elements that match the
instance
. Never null
.
filterResult
protected java.lang.Iterable<IEObjectDescription> filterResult(java.lang.Iterable<IEObjectDescription> unfiltered)
getAllElements
public java.lang.Iterable<IEObjectDescription> getAllElements()
- Description copied from interface:
IScope
- Obtain all elements from the scope. Implementors a free to throw an
UnsupportedOperationException
if the scope cannot be enumerated.
- Specified by:
getAllElements
in interface IScope
- Overrides:
getAllElements
in class AbstractScope
- Returns:
- all elements of the scope. Never
null
.
internalGetAllElements
protected java.lang.Iterable<IEObjectDescription> internalGetAllElements()
getAllLocalElements
protected java.lang.Iterable<IEObjectDescription> getAllLocalElements()
- Specified by:
getAllLocalElements
in class AbstractScope
getTypeProvider
public IJvmTypeProvider getTypeProvider()
getQualifiedNameConverter
public IQualifiedNameConverter getQualifiedNameConverter()
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractScope