Package net.ssehub.easy.varModel.model
Class ProjectType
java.lang.Object
net.ssehub.easy.varModel.model.ProjectType
- All Implemented Interfaces:
IDatatype,IDatatypeVisitable
Implements a private datatype class which represents the (pseudo) type of a project.
The (pseudo) type is intended as operand in custom operations.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for serialization.ProjectType(Project project) Creates the type instance of this. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IDatatypeVisitor visitor) Accepts a specialized visitor for creating a textual representation of the identity of this type.voidaddOperation(CustomOperation operation) Adds a custom operation.getGenericType(int index) Returns the specified generic type.intReturns the number of generic types.getName()Method to get the name of the Datatype.Returns the namespace of this datatype.getOperation(int index) Returns the operation specified byindex.intReturns the number of operations.Returns the qualified name of this element.getType()Returns the object realizing the type.Returns the java class realizing the type.Returns the unique name of this element.booleanisAssignableFrom(IDatatype type) Determines if the data type represented by this object is either the same as, or is a supertype oftype.booleanReturns whether this type is a primitive type.booleanReturns whether this type is a pseudo type.booleanremoveOperation(CustomOperation operation) Removes a custom operation.
-
Field Details
-
project
-
operationList
-
-
Constructor Details
-
ProjectType
ProjectType()Constructor for serialization. -
ProjectType
ProjectType(Project project) Creates the type instance of this.- Parameters:
project- TODO
-
-
Method Details
-
getName
Description copied from interface:IDatatypeMethod to get the name of the Datatype. -
getNameSpace
Description copied from interface:IDatatypeReturns the namespace of this datatype.- Specified by:
getNameSpacein interfaceIDatatype- Returns:
- Namespace of this datatype.
-
getQualifiedName
Description copied from interface:IDatatypeReturns the qualified name of this element.- Specified by:
getQualifiedNamein interfaceIDatatype- Returns:
- the qualified name
-
getUniqueName
Description copied from interface:IDatatypeReturns the unique name of this element.- Specified by:
getUniqueNamein interfaceIDatatype- Returns:
- the unique name
-
getOperation
Description copied from interface:IDatatypeReturns the operation specified byindex.- Specified by:
getOperationin interfaceIDatatype- Parameters:
index- a 0-based index specifying the operation to be returned- Returns:
- the operation
-
getOperationCount
public int getOperationCount()Description copied from interface:IDatatypeReturns the number of operations.- Specified by:
getOperationCountin interfaceIDatatype- Returns:
- the number of operations
-
addOperation
Adds a custom operation.- Parameters:
operation- the operation to be added
-
removeOperation
Removes a custom operation.- Parameters:
operation- the operation to be removed- Returns:
trueifoperationwas removed,falseelse
-
isAssignableFrom
Description copied from interface:IDatatypeDetermines if the data type represented by this object is either the same as, or is a supertype oftype.- Specified by:
isAssignableFromin interfaceIDatatype- Parameters:
type- the type being checked- Returns:
trueif this type is either the same or a supertype oftype,falseelse
-
getTypeClass
Description copied from interface:IDatatypeReturns the java class realizing the type.- Specified by:
getTypeClassin interfaceIDatatype- Returns:
- the java class realizing the type
-
getGenericType
Description copied from interface:IDatatypeReturns the specified generic type.- Specified by:
getGenericTypein interfaceIDatatype- Parameters:
index- the index of the type- Returns:
- the specified generic type
-
getGenericTypeCount
public int getGenericTypeCount()Description copied from interface:IDatatypeReturns the number of generic types.- Specified by:
getGenericTypeCountin interfaceIDatatype- Returns:
- the number of generic types
-
accept
Description copied from interface:IDatatypeVisitableAccepts a specialized visitor for creating a textual representation of the identity of this type.- Specified by:
acceptin interfaceIDatatypeVisitable- Parameters:
visitor- the visitor to accept
-
isPseudoType
public boolean isPseudoType()Description copied from interface:IDatatypeReturns whether this type is a pseudo type. This operation shall be used to prevent the output of internal types to the user.- Specified by:
isPseudoTypein interfaceIDatatype- Returns:
trueif it is a pseudo type,falseelse
-
getType
Description copied from interface:IDatatypeReturns the object realizing the type. -
isPrimitive
public boolean isPrimitive()Description copied from interface:IDatatypeReturns whether this type is a primitive type.- Specified by:
isPrimitivein interfaceIDatatype- Returns:
trueif it is a primitive type,falseelse
-