org.eclipse.xtext.common.types.xtext
Class AbstractConstructorScope

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractScope
      extended by org.eclipse.xtext.common.types.xtext.AbstractConstructorScope
All Implemented Interfaces:
IScope
Direct Known Subclasses:
ClasspathBasedConstructorScope, JdtBasedConstructorScope

public abstract class AbstractConstructorScope
extends AbstractScope

A scope that provides access to constructors. Case insensitivity is not supported. It's always the most outer scope. Lookup is delegated to a type scope.

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
AbstractScope.ParentIterable
 
Field Summary
 
Fields inherited from interface org.eclipse.xtext.scoping.IScope
NULLSCOPE
 
Constructor Summary
protected AbstractConstructorScope(AbstractTypeScope typeScope)
           
 
Method Summary
 java.lang.Iterable<IEObjectDescription> getAllElements()
          Obtain all elements from the scope.
protected  java.lang.Iterable<IEObjectDescription> getAllLocalElements()
           
 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.
 IQualifiedNameConverter getQualifiedNameConverter()
           
 IEObjectDescription getSingleElement(QualifiedName name)
          Find the first description that matches the given name.
 AbstractTypeScope getTypeScope()
           
protected  java.lang.Iterable<IEObjectDescription> internalGetAllElements()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
getLocalElementsByEObject, getLocalElementsByName, getParent, getParentElements, getSingleElement, getSingleLocalElementByName, isIgnoreCase, isShadowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractConstructorScope

protected AbstractConstructorScope(AbstractTypeScope typeScope)
Method Detail

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.

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.

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.

getAllElements

public final 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.

getAllLocalElements

protected java.lang.Iterable<IEObjectDescription> getAllLocalElements()
Specified by:
getAllLocalElements in class AbstractScope

internalGetAllElements

protected java.lang.Iterable<IEObjectDescription> internalGetAllElements()

getTypeScope

public AbstractTypeScope getTypeScope()

getQualifiedNameConverter

public IQualifiedNameConverter getQualifiedNameConverter()

toString

public java.lang.String toString()
Overrides:
toString in class AbstractScope