Class AbstractIvmlFieldDescriptor
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.FieldDescriptor
-
- net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlFieldDescriptor
-
- All Implemented Interfaces:
IMetaField
- Direct Known Subclasses:
IvmlAccessorFieldDescriptor,IvmlAnnotationFieldDescriptor,IvmlConfigurationFieldDescriptor
public abstract class AbstractIvmlFieldDescriptor extends FieldDescriptor
Implements the common capabilities for an IVML read-only field descriptor.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractVariablevar
-
Constructor Summary
Constructors Modifier Constructor Description (package private)AbstractIvmlFieldDescriptor()Constructor for serialization.protectedAbstractIvmlFieldDescriptor(TypeDescriptor<?> declaringType, AbstractVariable var, TypeRegistry registry)Creates the field descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetJavaSignature()Returns the java-like signature of this operation.TypeDescriptor<?>getMetaType()Returns the type to resolve operations on the field itself, e.g., whether the underlying decision variable is defined.protected java.lang.ObjectgetSpecificBaseValue(AbstractIvmlVariable tmp)Returns the specific base value according to the decision variable access functions.protected AbstractVariablegetVariable()Returns the underlying IVML variable.booleanisReadOnly()Returns whether the field is read-only.booleanisStatic()Returns whether the field is static.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.FieldDescriptor
getDeclaringType, getMetaValue, getName, getSignature, getType, getValue, setValue
-
-
-
-
Field Detail
-
var
private AbstractVariable var
-
-
Constructor Detail
-
AbstractIvmlFieldDescriptor
AbstractIvmlFieldDescriptor()
Constructor for serialization.
-
AbstractIvmlFieldDescriptor
protected AbstractIvmlFieldDescriptor(TypeDescriptor<?> declaringType, AbstractVariable var, TypeRegistry registry) throws VilException
Creates the field descriptor.- Parameters:
declaringType- the declaring typevar- the variable to create the descriptor forregistry- the actual type registry- Throws:
VilException- in case that creating the descriptor fails
-
-
Method Detail
-
getVariable
protected AbstractVariable getVariable()
Returns the underlying IVML variable.- Returns:
- the underlying variable
-
getJavaSignature
public java.lang.String getJavaSignature()
Description copied from interface:IMetaFieldReturns the java-like signature of this operation.- Returns:
- the java-like Java signature of this operation
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:IMetaFieldReturns whether the field is read-only. Please note that this method provides a "static" information, i.e., it cannot change during script execution. If a field can be modified at all, this method shall returntrueand determine when the value is changed, whether the actual access is permitted. In contrast, if it is known that the field cannot be changed at all, this method shall returnfalse.- Returns:
trueif the field is read-only,falseelse
-
isStatic
public boolean isStatic()
Description copied from interface:IMetaFieldReturns whether the field is static.- Returns:
trueif the field is static,falseelse
-
getMetaType
public TypeDescriptor<?> getMetaType()
Description copied from class:FieldDescriptorReturns the type to resolve operations on the field itself, e.g., whether the underlying decision variable is defined. A field must not return a type (null, in particular ifIMetaField.isStatic()). If not null, this class must return a valid value inFieldDescriptor.getMetaValue(Object).- Overrides:
getMetaTypein classFieldDescriptor- Returns:
- null
-
getSpecificBaseValue
protected java.lang.Object getSpecificBaseValue(AbstractIvmlVariable tmp)
Returns the specific base value according to the decision variable access functions.- Parameters:
tmp- the decision variable- Returns:
- the specific base value, null if not possible
-
-