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 implement
IContainer.getResourceDescriptions()
.
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractContainer
public AbstractContainer()
getSelectables
protected java.lang.Iterable<IResourceDescription> getSelectables()
- Specified by:
getSelectables
in class AbstractCompoundSelectable
getResourceDescriptionCount
public int getResourceDescriptionCount()
- Specified by:
getResourceDescriptionCount
in interface IContainer
- 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 interface IContainer
- Returns:
true
if the container can provide a resource description with the given uri
.
getResourceDescription
public IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
- Specified by:
getResourceDescription
in interface IContainer
- Returns:
- the
IResourceDescription
for the given URI, or null is this container does
not contain such an IResourceDescription
.
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 interface ISelectable
- Overrides:
getExportedObjectsByObject
in class AbstractCompoundSelectable
- Returns:
- all elements which match the given instance. May not be
null
.