Class FreezeVariableType
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.StructuredDatatype
net.ssehub.easy.varModel.model.datatypes.FreezeVariableType
- All Implemented Interfaces:
IDatatype,IDatatypeVisitable,IModelElement
An internal type for freezes to iterate / specify expressions on freezables.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates the singleton instance forTYPE.FreezeVariableType(IFreezable[] freezables, IModelElement parent) Constructor for a specific freeze variable type. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept method for the visitor.(package private) voidaddAttribute(Attribute attribute) Adds an attribute to this type.getAttribute(int index) Returns the specified attribute.getAttribute(String name) Returns the attribute of the givenname.intReturns the number of attributes.private voidindexAttributes(IFreezable freezable, Map<String, Attribute> attributes) Indexes all attributes for adding them to the internal type.booleanisAssignableFrom(IDatatype type) Determines if the data type represented by this object is either the same as, or is a supertype oftype.Methods inherited from class net.ssehub.easy.varModel.model.datatypes.CustomDatatype
getGenericType, getGenericTypeCount, getOperation, getOperationCount, getType, getTypeClass, isPrimitive, isPseudoType, isTypeMethods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, 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, getUniqueNameMethods inherited from interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitable
accept
-
Field Details
-
DTYPE
-
TYPE
This constant represents the common type of all freeze variables. Each specific freeze variable type is assignable to this type. -
NAME
-
NAME2
-
QNAME
-
QNAME2
-
attributes
-
-
Constructor Details
-
FreezeVariableType
private FreezeVariableType()Creates the singleton instance forTYPE. -
FreezeVariableType
Constructor for a specific freeze variable type.- Parameters:
freezables- the freezables to derive the structure of this type fromparent- the object, in which this specific one is embedded
-
-
Method Details
-
indexAttributes
Indexes all attributes for adding them to the internal type.- Parameters:
freezable- the freezable to be analyzedattributes- the name-attributes map (modified as a side effect)
-
accept
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
isAssignableFrom
Description copied from class:CustomDatatypeDetermines 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
-
addAttribute
Adds an attribute to this type.- Parameters:
attribute- the attribute to be added
-
getAttributesCount
public int getAttributesCount()Returns the number of attributes.- Returns:
- the number of attributes
-
getAttribute
Returns the specified attribute.- Parameters:
index- the 0-based index of the attribute to return- Returns:
- the specified attribute
- Throws:
IndexOutOfBoundsException- ifindex<0 || index>=getAttributesCount()
-
getAttribute
Returns the attribute of the givenname.- Parameters:
name- the name of the attribute- Returns:
- the attribute or null if none was found
-