org.eclipse.xtext.resource
Interface IContainer

All Superinterfaces:
ISelectable
All Known Implementing Classes:
AbstractContainer, DescriptionAddingContainer, FilterUriContainer, ResourceDescriptionsBasedContainer, StateBasedContainer

public interface IContainer
extends ISelectable

A container describes resources that should be treated as visible on the same level during the scoping stage. This depends on language implementations in a way that a container that was obtained for a given resource may contain other resources that would create other containers with distinct contents. A container may be optimized by means of the ISelectable-contract.

Author:
Sven Efftinge - Initial contribution and API, Jan Koehnlein - introduced QualifiedName, Sebastian Zarnekow - Extracted ISelectable

Nested Class Summary
static interface IContainer.Manager
           
 
Field Summary
static IContainer NULL_CONTAINER
          a no-op implementation
 
Method Summary
 IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
           
 int getResourceDescriptionCount()
           
 java.lang.Iterable<IResourceDescription> getResourceDescriptions()
           
 boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
           
 
Methods inherited from interface org.eclipse.xtext.resource.ISelectable
getExportedObjects, getExportedObjects, getExportedObjectsByObject, getExportedObjectsByType, isEmpty
 

Field Detail

NULL_CONTAINER

static final IContainer NULL_CONTAINER
a no-op implementation

Method Detail

getResourceDescriptions

java.lang.Iterable<IResourceDescription> getResourceDescriptions()
Returns:
the IResourceDescription contained in this container. The result is never null. The result may be a cached view on the actual content of the underlying resources.

getResourceDescriptionCount

int getResourceDescriptionCount()
Returns:
the total number of resource descriptions returned by getResourceDescriptions()

hasResourceDescription

boolean hasResourceDescription(org.eclipse.emf.common.util.URI uri)
Returns:
true if the container can provide a resource description with the given uri.

getResourceDescription

IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
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.