org.eclipse.xtext.resource.impl
Class AbstractContainer

java.lang.Object
  extended by org.eclipse.xtext.resource.impl.AbstractCompoundSelectable
      extended by 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

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
AbstractContainer()
           
 
Method Summary
 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
 

Constructor Detail

AbstractContainer

public AbstractContainer()
Method Detail

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.