public class EnumerationValue extends Object implements SimpleValue, ModelInstanceAware
| Modifier | Constructor and Description |
|---|---|
protected |
EnumerationValue()
A default constructor.
|
|
EnumerationValue(ModelInstance modelInstance,
String module,
String name,
String constant)
Constructs an enumeration instance of a given model instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
EnumerationType |
getCompiledType(ModelProviderClientService modelProviderService)
Returns the compiled type.
|
String |
getConstant() |
ModelInstance |
getModelInstance()
Returns the model instance.
|
String |
getType()
Returns the type.
|
Object |
getValue()
Returns the contained value.
|
boolean |
isRemoved()
Returns true if value is removed
|
EnumerationValue |
makeCopy(ModelInstance targetModelInstance)
Creates copy of the value in the target model instance.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
void |
preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked before unmarshalling into target.
|
void |
rebind(ModelInstance modelInstance)
Re-bind to the provided model instance.
|
SimpleValue |
toSimpleValue()
If this is
SimpleValue this method returns this, otherwise it returns a
ValueRef to this. |
String |
toString() |
Value |
toValue()
If this is a
ValueRef this method returns the referenced value, otherwise it returns
this. |
protected EnumerationValue()
public EnumerationValue(ModelInstance modelInstance, String module, String name, String constant)
modelInstance - module - a module of the enumeration typename - a name of the enumeration typeconstant - an enumeration constantpublic String getConstant()
public <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Valuepublic SimpleValue toSimpleValue()
ValueSimpleValue this method returns this, otherwise it returns a
ValueRef to this.toSimpleValue in interface ValueSimpleValuepublic Value toValue()
ValueValueRef this method returns the referenced value, otherwise it returns
this.public ModelInstance getModelInstance()
ModelInstanceAwaregetModelInstance in interface ModelInstanceAwarepublic void rebind(ModelInstance modelInstance)
ModelInstanceAwarerebind in interface ModelInstanceAwarepublic EnumerationType getCompiledType(ModelProviderClientService modelProviderService)
ValuegetCompiledType in interface Valuepublic Object getValue()
SimpleValuegetValue in interface SimpleValuepublic void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallbackpreUnmarshal in interface UnmarshalCallbackparent - instance of JAXB mapped class that will eventually reference target.
null when target is root element.public void postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallbackpostUnmarshal in interface UnmarshalCallbackparent - instance of JAXB mapped class that will reference target.
null when target is root element.public EnumerationValue makeCopy(ModelInstance targetModelInstance)
ValuemakeCopy in interface SimpleValuemakeCopy in interface Valuepublic boolean isRemoved()
ValueCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.