Interface IResolutionScope
-
- All Known Implementing Classes:
Compound,ContainableModelElementList,Project,ProjectInterface,TypeContext
public interface IResolutionScopeProvides access to containable model elements.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContainableModelElementgetElement(int index)Returns a contained model element specified byindex.ContainableModelElementgetElement(java.lang.String name)Returns a contained model element specified by itsname.intgetElementCount()Returns the number of contained elements.ProjectImportgetImport(int index)Returns the project import specified byindex.intgetImportsCount()Returns the number of imports.java.lang.StringgetName()Returns the (unqualified) name of the scope.IModelElementgetParent()Returns the parent model element.booleanhasInterfaces()Returns whether this scope has interfaces.booleanisInterface()Returns whether this scope is an interfaces.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the (unqualified) name of the scope.- Returns:
- the unqualified name of the scope
-
getParent
IModelElement getParent()
Returns the parent model element.- Returns:
- the parent model element (may be null)
-
getElement
ContainableModelElement getElement(int index)
Returns a contained model element specified byindex.- Parameters:
index- a 0-based index specifying the operation to be returned- Returns:
- the contained element
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getElementCount()
-
getElement
ContainableModelElement getElement(java.lang.String name)
Returns a contained model element specified by itsname.- Parameters:
name- the qualified or unqualified name to search for- Returns:
- the related element or null if no such element is known
-
getElementCount
int getElementCount()
Returns the number of contained elements.- Returns:
- the number of contained elements
-
getImportsCount
int getImportsCount()
Returns the number of imports.- Returns:
- the number of imports
-
getImport
ProjectImport getImport(int index)
Returns the project import specified byindex.- Parameters:
index- a 0-based index specifying the import to be returned- Returns:
- the project import
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getImportsCount()
-
hasInterfaces
boolean hasInterfaces()
Returns whether this scope has interfaces.- Returns:
trueif it has interfaces,falseelse
-
isInterface
boolean isInterface()
Returns whether this scope is an interfaces.- Returns:
trueif it is an interface,falseelse
-
-