public class TypeValue extends java.lang.Object implements SimpleValue, ModelInstanceAware
Constructor and Description |
---|
TypeValue(ModelInstance modelInstance,
java.lang.String type)
Creates new instance of
TypeValue . |
TypeValue(ModelInstance modelInstance,
java.lang.String type,
Type compiledType)
Creates new instance of
TypeValue . |
Modifier and Type | Method and Description |
---|---|
<T,E extends java.lang.Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
TypeValue |
createCopy(ModelInstance targetModelInstance)
Creates a copy without references to other objects.
|
TypeType |
getCompiledType(ModelProvider modelProvider)
Returns the compiled type.
|
Type |
getCompiledValue(ModelProvider modelProvider)
Returns the compiled type value.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
java.lang.String |
getType()
Returns the type.
|
java.lang.String |
getValue()
Returns the contained value.
|
boolean |
isRemoved()
Returns true if value is removed
|
void |
rebind(ModelInstance modelInstance)
Re-bind to the provided model instance.
|
SSimpleValue |
toSerializable(SModelInstance smi,
MarshallerConfig config)
Creates a serializable object.
|
SimpleValue |
toSimpleValue()
If this is
SimpleValue this method returns this, otherwise it returns a
ValueRef to this. |
Value |
toValue()
If this is a
ValueRef this method returns the referenced value, otherwise it returns
this. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
finishCopy
public TypeValue(ModelInstance modelInstance, java.lang.String type)
TypeValue
.modelInstance
- type
- java.lang.NullPointerException
- if type
is nullpublic TypeValue(ModelInstance modelInstance, java.lang.String type, Type compiledType)
TypeValue
.modelInstance
- type
- compiledType
- java.lang.NullPointerException
- if type
is nullpublic SSimpleValue toSerializable(SModelInstance smi, MarshallerConfig config)
SimpleValue
toSerializable
in interface SimpleValue
toSerializable
in interface Value
public java.lang.String getValue()
SimpleValue
getValue
in interface SimpleValue
public Type getCompiledValue(ModelProvider modelProvider)
modelProvider
- public java.lang.String getType()
Value
public ModelInstance getModelInstance()
ModelInstanceAware
getModelInstance
in interface ModelInstanceAware
public void rebind(ModelInstance modelInstance)
ModelInstanceAware
rebind
in interface ModelInstanceAware
public TypeType getCompiledType(ModelProvider modelProvider)
Value
getCompiledType
in interface Value
public <T,E extends java.lang.Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends java.lang.Throwable
Value
public SimpleValue toSimpleValue()
Value
SimpleValue
this method returns this, otherwise it returns a
ValueRef
to this.toSimpleValue
in interface Value
SimpleValue
public Value toValue()
Value
ValueRef
this method returns the referenced value, otherwise it returns
this.public TypeValue createCopy(ModelInstance targetModelInstance)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.