Class Reference
java.lang.Object
net.ssehub.easy.varModel.model.ModelElement
net.ssehub.easy.varModel.model.ContainableModelElement
net.ssehub.easy.varModel.model.datatypes.CustomDatatype
net.ssehub.easy.varModel.model.datatypes.Reference
- All Implemented Interfaces:
IDatatype,IDatatypeVisitable,IModelElement
A reference allows the definition of individual configurations of an (external) element for the referencing element.
Currently, operations such as assignments are represented as the respective operations of the base type. Actually,
this may be confusing / wrong. See
ConstraintSyntaxTree.inferDatatype().- Author:
- heiko beck, Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Operationstatic final Operation(package private) static final DelegatingTypestatic final Operationstatic final Operationstatic final Operationstatic final Operationprivate IDatatypestatic final IDatatypeThis constant represents the common type of all references.static final Operationstatic final Operationstatic final Operation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IDatatypeVisitor visitor) Accepts a specialized visitor for creating a textual representation of the identity of this type.voidaccept(IModelVisitor visitor) Accept method for the visitor.static IDatatypedereference(IDatatype type) Aims at dereferencetypein case that it is a reference.static voiddereference(IDatatype[] types) Dereferences all datatypes intype.getType()Returns the type this reference is referring to.booleanisAssignableFrom(IDatatype type) Determines if the data type represented by this object is either the same as, or is a supertype oftype.static booleanisReferenceTo(IDatatype type, IDatatype parameter) Returns whether the giventypeis a reference with givengeneric.Methods inherited from class net.ssehub.easy.varModel.model.datatypes.CustomDatatype
getGenericType, getGenericTypeCount, getOperation, getOperationCount, getTypeClass, isPrimitive, isPseudoType, isTypeMethods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParentMethods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ssehub.easy.varModel.model.datatypes.IDatatype
getName, getNameSpace, getQualifiedName, getUniqueName
-
Field Details
-
DTYPE
-
TYPE
This constant represents the common type of all references. Each specific reference type is assignable to this type. -
TYPE_OF
-
EQUALS
-
UNEQUALS
-
UNEQUALS_ALIAS
-
ASSIGNMENT
-
IS_DEFINED
-
IF_DEFINED
-
COPY
-
REF_BY
-
type
-
-
Constructor Details
-
Reference
private Reference()Creates the singleton instance forTYPE. -
Reference
Constructor for the reference.- Parameters:
name- Name of referencetype- the type to refer toparent- the object, in which this specific one is embedded
-
-
Method Details
-
getType
Returns the type this reference is referring to.- Specified by:
getTypein interfaceIDatatype- Overrides:
getTypein classCustomDatatype- Returns:
- the type
-
accept
Accept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
accept
Description copied from interface:IDatatypeVisitableAccepts a specialized visitor for creating a textual representation of the identity of this type.- Specified by:
acceptin interfaceIDatatypeVisitable- Overrides:
acceptin classContainableModelElement- Parameters:
visitor- the visitor to accept
-
isAssignableFrom
Determines if the data type represented by this object is either the same as, or is a supertype oftype.- Specified by:
isAssignableFromin interfaceIDatatype- Overrides:
isAssignableFromin classCustomDatatype- Parameters:
type- the type being checked- Returns:
trueif this type is either the same or a supertype oftype,trueelse
-
dereference
Aims at dereferencetypein case that it is a reference.- Parameters:
type- the type to dereference- Returns:
- the dereferenced type (or
typeiftypewas not a reference)
-
dereference
Dereferences all datatypes intype.- Parameters:
types- the types to be dereferenced
-
isReferenceTo
Returns whether the giventypeis a reference with givengeneric.- Parameters:
type- the type to checkparameter- the parameter type of the expected reference (may also be a more generic type)- Returns:
trueiftypeisrefTo(generic),falseelse
-