org.simantics.databoard.binding.reflection
Class ConstantBinding
java.lang.Object
org.simantics.databoard.binding.Binding
org.simantics.databoard.binding.RecordBinding
org.simantics.databoard.binding.reflection.ConstantBinding
- All Implemented Interfaces:
- java.util.Comparator<java.lang.Object>
public class ConstantBinding
- extends RecordBinding
Method Summary |
java.lang.Object |
create(java.lang.Object... value)
Create a record using values. |
java.lang.Object |
createPartial()
Creates partial and most likely invalid instance. |
java.lang.Object |
getComponent(java.lang.Object obj,
int index)
|
boolean |
isImmutable()
Return true if the value is immutable. |
boolean |
isInstance(java.lang.Object obj)
|
void |
setComponent(java.lang.Object obj,
int index,
java.lang.Object value)
|
void |
setComponents(java.lang.Object obj,
java.lang.Object... value)
|
Methods inherited from class org.simantics.databoard.binding.RecordBinding |
accept, accept, assertInstaceIsValid, createUnchecked, deepCompare, deepHashValue, getComponentBinding, getComponentBinding, getComponentBinding, getComponentBindings, getComponentCount, readFrom, setComponentsUnchecked, setComponentUnchecked, type |
Methods inherited from class org.simantics.databoard.binding.Binding |
assertInstaceIsValid, clone, cloneUnchecked, compare, createDefault, createDefaultUnchecked, createRandom, createRandomUnchecked, equals, hashValue, parseValue, parseValue, parseValueDefinition, printValue, printValueDefinition, serializer, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
ConstantBinding
public ConstantBinding(Datatype type,
java.lang.Object constantValue)
create
public java.lang.Object create(java.lang.Object... value)
throws BindingException
- Description copied from class:
RecordBinding
- Create a record using values.
Note! values may be consumed (used in the result)
- Specified by:
create
in class RecordBinding
- Returns:
- new record
- Throws:
BindingException
getComponent
public java.lang.Object getComponent(java.lang.Object obj,
int index)
throws BindingException
- Specified by:
getComponent
in class RecordBinding
- Throws:
BindingException
createPartial
public java.lang.Object createPartial()
throws BindingException
- Description copied from class:
RecordBinding
- Creates partial and most likely invalid instance.
This is used in two-phase construction of recursive instances.
- Specified by:
createPartial
in class RecordBinding
- Returns:
- instance.
- Throws:
BindingException
setComponents
public void setComponents(java.lang.Object obj,
java.lang.Object... value)
throws BindingException
- Specified by:
setComponents
in class RecordBinding
- Throws:
BindingException
setComponent
public void setComponent(java.lang.Object obj,
int index,
java.lang.Object value)
throws BindingException
- Specified by:
setComponent
in class RecordBinding
- Throws:
BindingException
isInstance
public boolean isInstance(java.lang.Object obj)
- Specified by:
isInstance
in class Binding
isImmutable
public boolean isImmutable()
- Description copied from class:
Binding
- Return true if the value is immutable.
This question excludes the immutability of the component types.
- Overrides:
isImmutable
in class Binding
- Returns:
true
value if immutable