Package org.eclipse.xtext.resource.impl
Class AbstractContainer
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
-
- org.eclipse.xtext.resource.impl.AbstractContainer
-
- All Implemented Interfaces:
IContainer
,ISelectable
- Direct Known Subclasses:
DescriptionAddingContainer
,FilterUriContainer
,ResourceDescriptionsBasedContainer
public abstract class AbstractContainer extends AbstractCompoundSelectable implements IContainer
Abstract container implementation. Minimal clients have to implementIContainer.getResourceDescriptions()
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.resource.IContainer
IContainer.Manager
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.resource.IContainer
NULL_CONTAINER
-
-
Constructor Summary
Constructors Constructor Description AbstractContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<IEObjectDescription>
getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
IResourceDescription
getResourceDescription(org.eclipse.emf.common.util.URI uri)
int
getResourceDescriptionCount()
protected java.lang.Iterable<IResourceDescription>
getSelectables()
boolean
hasResourceDescription(org.eclipse.emf.common.util.URI uri)
-
Methods inherited from class org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
getExportedObjects, getExportedObjects, getExportedObjectsByType, isEmpty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.resource.IContainer
getResourceDescriptions
-
Methods inherited from interface org.eclipse.xtext.resource.ISelectable
getExportedObjects, getExportedObjects, getExportedObjectsByType, isEmpty
-
-
-
-
Method Detail
-
getSelectables
protected java.lang.Iterable<IResourceDescription> getSelectables()
- Specified by:
getSelectables
in classAbstractCompoundSelectable
-
getResourceDescriptionCount
public int getResourceDescriptionCount()
- Specified by:
getResourceDescriptionCount
in interfaceIContainer
- Returns:
- the total number of resource descriptions returned by
IContainer.getResourceDescriptions()
-
hasResourceDescription
public boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
hasResourceDescription
in interfaceIContainer
- Returns:
true
if the container can provide aresource description with the given uri
.
-
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
getResourceDescription
in interfaceIContainer
- Returns:
- the
IResourceDescription
for the given URI, or null is this container does not contain such anIResourceDescription
. The result may be a cached view on the actual content of the underlying resource.
-
getExportedObjectsByObject
public java.lang.Iterable<IEObjectDescription> getExportedObjectsByObject(org.eclipse.emf.ecore.EObject object)
- Specified by:
getExportedObjectsByObject
in interfaceISelectable
- Overrides:
getExportedObjectsByObject
in classAbstractCompoundSelectable
- Returns:
- all elements which match the given instance. May not be
null
.
-
-