Package net.ssehub.easy.varModel.model
Class ProjectInterface
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.ContainableModelElement
-
- net.ssehub.easy.varModel.model.ProjectInterface
-
- All Implemented Interfaces:
IDatatypeVisitable,IResolutionScope,IModelElement
public class ProjectInterface extends ContainableModelElement implements IResolutionScope
ProjectInterface class.- Author:
- heiko beck, Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private DecisionVariableDeclaration[]exports
-
Constructor Summary
Constructors Constructor Description ProjectInterface(java.lang.String name, DecisionVariableDeclaration[] exports, ModelElement parent)Constructor for the project interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IModelVisitor visitor)Accept method for the visitor.booleanequals(java.lang.Object obj)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.DecisionVariableDeclarationgetExport(int index)Returns the exported decision variable specified byindex.intgetExportsCount()Returns the number of exports.ProjectImportgetImport(int index)Returns the project import specified byindex.intgetImportsCount()Returns the number of imports.inthashCode()booleanhasInterfaces()Returns whether this project has interfaces.booleanisFullConfigurable()Method checks the configurable status of an object.booleanisInterface()Returns whether this scope is an interfaces.-
Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParent
-
Methods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.varModel.model.datatypes.IResolutionScope
getName, getParent
-
-
-
-
Field Detail
-
exports
private DecisionVariableDeclaration[] exports
-
-
Constructor Detail
-
ProjectInterface
public ProjectInterface(java.lang.String name, DecisionVariableDeclaration[] exports, ModelElement parent)Constructor for the project interface.- Parameters:
name- Name of the project interfaceexports- the exports of this interfaceparent- the object, in which this specific one is embedded
-
-
Method Detail
-
isFullConfigurable
public boolean isFullConfigurable()
Method checks the configurable status of an object.- Returns:
- the configurable status.
-
getExportsCount
public int getExportsCount()
Returns the number of exports.- Returns:
- the number of exports
-
getExport
public DecisionVariableDeclaration getExport(int index)
Returns the exported decision variable specified byindex.- Parameters:
index- a 0-based index specifying the operation to be returned- Returns:
- the exported decision variable
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getExportsCount()
-
accept
public void accept(IModelVisitor visitor)
Description copied from interface:IModelElementAccept method for the visitor.- Specified by:
acceptin interfaceIModelElement- Parameters:
visitor- The visitor, which should process this model element.
-
getElement
public ContainableModelElement getElement(int index)
Returns a contained model element specified byindex.- Specified by:
getElementin interfaceIResolutionScope- Parameters:
index- a 0-based index specifying the operation to be returned- Returns:
- the contained element
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getElementCount()- See Also:
getExport(int)
-
getElementCount
public int getElementCount()
Returns the number of contained elements.- Specified by:
getElementCountin interfaceIResolutionScope- Returns:
- the number of contained elements
- See Also:
getExportsCount()
-
getImportsCount
public int getImportsCount()
Description copied from interface:IResolutionScopeReturns the number of imports.- Specified by:
getImportsCountin interfaceIResolutionScope- Returns:
- the number of imports
-
getImport
public ProjectImport getImport(int index)
Description copied from interface:IResolutionScopeReturns the project import specified byindex.- Specified by:
getImportin interfaceIResolutionScope- Parameters:
index- a 0-based index specifying the import to be returned- Returns:
- the project import
-
hasInterfaces
public boolean hasInterfaces()
Returns whether this project has interfaces.- Specified by:
hasInterfacesin interfaceIResolutionScope- Returns:
trueif it has interfaces,falseelse
-
isInterface
public boolean isInterface()
Description copied from interface:IResolutionScopeReturns whether this scope is an interfaces.- Specified by:
isInterfacein interfaceIResolutionScope- Returns:
trueif it is an interface,falseelse
-
getElement
public ContainableModelElement getElement(java.lang.String name)
Description copied from interface:IResolutionScopeReturns a contained model element specified by itsname.- Specified by:
getElementin interfaceIResolutionScope- Parameters:
name- the qualified or unqualified name to search for- Returns:
- the related element or null if no such element is known
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-