Class IvmlAccessorFieldDescriptor
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.FieldDescriptor
-
- net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlFieldDescriptor
-
- net.ssehub.easy.instantiation.core.model.vilTypes.configuration.IvmlAccessorFieldDescriptor
-
- All Implemented Interfaces:
IMetaField
public class IvmlAccessorFieldDescriptor extends AbstractIvmlFieldDescriptor
Defines a pseudo field descriptor which enables comfortable access to an individual decision variables via its name.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description IvmlAccessorFieldDescriptor()Constructor for serialization.IvmlAccessorFieldDescriptor(TypeDescriptor<?> declaringType, DecisionVariableDeclaration var, TypeRegistry registry)Creates the field descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetMetaValue(java.lang.Object owner)Returns the value corresponding toFieldDescriptor.getMetaType().java.lang.ObjectgetValue(java.lang.Object owner)Returns the actual value of this field.voidsetValue(java.lang.Object owner, java.lang.Object value)Changes the actual value for this field inowner.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.configuration.AbstractIvmlFieldDescriptor
getJavaSignature, getMetaType, getSpecificBaseValue, getVariable, isReadOnly, isStatic
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.FieldDescriptor
getDeclaringType, getName, getSignature, getType
-
-
-
-
Constructor Detail
-
IvmlAccessorFieldDescriptor
public IvmlAccessorFieldDescriptor()
Constructor for serialization.
-
IvmlAccessorFieldDescriptor
IvmlAccessorFieldDescriptor(TypeDescriptor<?> declaringType, DecisionVariableDeclaration 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
-
getValue
public java.lang.Object getValue(java.lang.Object owner) throws VilExceptionDescription copied from class:FieldDescriptorReturns the actual value of this field.- Specified by:
getValuein classFieldDescriptor- Parameters:
owner- the owning object (ignored, i.e., shall be null, ifIMetaField.isStatic())- Returns:
- the actual value
- Throws:
VilException- in case that retrieving the value fails
-
setValue
public void setValue(java.lang.Object owner, java.lang.Object value) throws VilExceptionDescription copied from class:FieldDescriptorChanges the actual value for this field inowner.- Specified by:
setValuein classFieldDescriptor- Parameters:
owner- the owning object (ignored, i.e., shall be null, ifIMetaField.isStatic())value- the new value- Throws:
VilException- in case that setting the value fails, e.g., as this field isIMetaField.isReadOnly()
-
getMetaValue
public java.lang.Object getMetaValue(java.lang.Object owner) throws VilExceptionDescription copied from class:FieldDescriptorReturns the value corresponding toFieldDescriptor.getMetaType().- Overrides:
getMetaValuein classFieldDescriptor- Parameters:
owner- the owning object- Returns:
- the actual value
- Throws:
VilException- in case that retrieving the value fails
-
-