Class ConfigEditorValueRetriever
- java.lang.Object
-
- net.ssehub.easy.producer.ui.confModel.ConfigEditorValueRetriever
-
- All Implemented Interfaces:
IDatatypeVisitor
class ConfigEditorValueRetriever extends java.lang.Object implements IDatatypeVisitor
This class is part of the ConfigurationCellEditor.getValue(Object) and converts a givenIDecisionVariableto an Object so that the Eclipse editors are able to handle it.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectreturnValueprivate IDecisionVariablevariable
-
Constructor Summary
Constructors Constructor Description ConfigEditorValueRetriever(IDecisionVariable variable)Sole constructor for this class for converting a givenIDecisionVariableto an Object so that the Eclipse editors are able to handle it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.ObjectgetValue()Returns the value of the givenIDecisionVariableso that it can be used as return value for the ConfigurationCellEditor.getValue(Object) method.private voidhandleSetAndSequence(Container type)Sets the returnValue for Container types.private voidhandleSimpleDatatype()Sets the returnValue for simple datatypes like BasisDatatypes.voidvisitAnyType(AnyType datatype)Is called by an AnyType.voidvisitBooleanType(BooleanType type)Visiting method for visiting aBooleanType.voidvisitCompoundType(Compound compound)Visiting method for visiting aCompound.voidvisitConstraintType(ConstraintType datatype)Visiting method for visiting aConstraintType.voidvisitDatatype(IDatatype datatype)Is called by an arbitrary data type.voidvisitDerivedType(DerivedDatatype datatype)Is called by anDerivedDatatypedata type.voidvisitEnumType(Enum enumType)Visiting method for visiting aEnum.voidvisitIntegerType(IntegerType type)Visiting method for visiting aIntegerType.voidvisitMetaType(MetaType datatype)Is called by a MetaType.voidvisitOrderedEnumType(OrderedEnum enumType)Visiting method for visiting aOrderredEnum.voidvisitRealType(RealType type)Visiting method for visiting aRealType.voidvisitReference(Reference reference)Is called by a reference data type.voidvisitSequence(Sequence sequence)Is called by a sequence datatype.voidvisitSet(Set set)Is called by a set data type.voidvisitStringType(StringType type)Visiting method for visiting aStringType.voidvisitVersionType(VersionType type)Visiting method for visiting aVersionType.
-
-
-
Field Detail
-
returnValue
private java.lang.Object returnValue
-
variable
private IDecisionVariable variable
-
-
Constructor Detail
-
ConfigEditorValueRetriever
ConfigEditorValueRetriever(IDecisionVariable variable)
Sole constructor for this class for converting a givenIDecisionVariableto an Object so that the Eclipse editors are able to handle it.- Parameters:
variable- The to be convertedIDecisionVariable.
-
-
Method Detail
-
getValue
java.lang.Object getValue()
Returns the value of the givenIDecisionVariableso that it can be used as return value for the ConfigurationCellEditor.getValue(Object) method.- Returns:
- A value as needed by the Eclipse UI.
-
visitDatatype
public void visitDatatype(IDatatype datatype)
Description copied from interface:IDatatypeVisitorIs called by an arbitrary data type.- Specified by:
visitDatatypein interfaceIDatatypeVisitor- Parameters:
datatype- the data type.
-
visitAnyType
public void visitAnyType(AnyType datatype)
Description copied from interface:IDatatypeVisitorIs called by an AnyType.- Specified by:
visitAnyTypein interfaceIDatatypeVisitor- Parameters:
datatype- the data type.
-
visitMetaType
public void visitMetaType(MetaType datatype)
Description copied from interface:IDatatypeVisitorIs called by a MetaType.- Specified by:
visitMetaTypein interfaceIDatatypeVisitor- Parameters:
datatype- the data type.
-
visitConstraintType
public void visitConstraintType(ConstraintType datatype)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aConstraintType.- Specified by:
visitConstraintTypein interfaceIDatatypeVisitor- Parameters:
datatype- TheIDatatypewhich should be visited.
-
visitDerivedType
public void visitDerivedType(DerivedDatatype datatype)
Description copied from interface:IDatatypeVisitorIs called by anDerivedDatatypedata type.- Specified by:
visitDerivedTypein interfaceIDatatypeVisitor- Parameters:
datatype- the data type.
-
visitSet
public void visitSet(Set set)
Description copied from interface:IDatatypeVisitorIs called by a set data type.- Specified by:
visitSetin interfaceIDatatypeVisitor- Parameters:
set- the set instance
-
visitSequence
public void visitSequence(Sequence sequence)
Description copied from interface:IDatatypeVisitorIs called by a sequence datatype.- Specified by:
visitSequencein interfaceIDatatypeVisitor- Parameters:
sequence- the sequence instance
-
handleSetAndSequence
private void handleSetAndSequence(Container type)
Sets the returnValue for Container types.- Parameters:
type- The Container of the currentIDecisionVariable.
-
visitReference
public void visitReference(Reference reference)
Description copied from interface:IDatatypeVisitorIs called by a reference data type.- Specified by:
visitReferencein interfaceIDatatypeVisitor- Parameters:
reference- the references instance
-
visitBooleanType
public void visitBooleanType(BooleanType type)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aBooleanType.- Specified by:
visitBooleanTypein interfaceIDatatypeVisitor- Parameters:
type- TheIDatatypewhich should be visited.
-
visitStringType
public void visitStringType(StringType type)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aStringType.- Specified by:
visitStringTypein interfaceIDatatypeVisitor- Parameters:
type- TheIDatatypewhich should be visited.
-
visitIntegerType
public void visitIntegerType(IntegerType type)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aIntegerType.- Specified by:
visitIntegerTypein interfaceIDatatypeVisitor- Parameters:
type- TheIDatatypewhich should be visited.
-
visitRealType
public void visitRealType(RealType type)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aRealType.- Specified by:
visitRealTypein interfaceIDatatypeVisitor- Parameters:
type- TheIDatatypewhich should be visited.
-
handleSimpleDatatype
private void handleSimpleDatatype()
Sets the returnValue for simple datatypes like BasisDatatypes.
-
visitCompoundType
public void visitCompoundType(Compound compound)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aCompound.- Specified by:
visitCompoundTypein interfaceIDatatypeVisitor- Parameters:
compound- TheCompoundwhich should be visited.
-
visitEnumType
public void visitEnumType(Enum enumType)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aEnum.- Specified by:
visitEnumTypein interfaceIDatatypeVisitor- Parameters:
enumType- TheEnumwhich should be visited.
-
visitOrderedEnumType
public void visitOrderedEnumType(OrderedEnum enumType)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aOrderredEnum.- Specified by:
visitOrderedEnumTypein interfaceIDatatypeVisitor- Parameters:
enumType- TheEnumwhich should be visited.
-
visitVersionType
public void visitVersionType(VersionType type)
Description copied from interface:IDatatypeVisitorVisiting method for visiting aVersionType.- Specified by:
visitVersionTypein interfaceIDatatypeVisitor- Parameters:
type- TheIDatatypewhich should be visited.
-
-