public final class PropertyReference extends java.lang.Object implements Resolvable, Accessor
Modifier and Type | Class and Description |
---|---|
private class |
PropertyReference.PropertyAssigner
A simple assigner to update the backing class property, when the call returns.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
className
The fully qualified legacy class name for this property, in case of static properties.
|
private java.lang.Integer |
extent
The property's extent.
|
private InternalEntry |
getter
The associated getter for the property.
|
private int64 |
index
The index, in case of extent properties.
|
private object<? extends _BaseObject_> |
instance
The object instance, in case of instance properties.
|
private java.lang.String |
property
The legacy property name to access.
|
private java.lang.Class<? extends BaseDataType> |
propType
The property's data type.
|
private _BaseObject_ |
reference
In case of an instance property, the legacy reference.
|
private InternalEntry |
setter
The associated setter for the property.
|
private java.lang.Class<? extends _BaseObject_> |
type
The legacy type to which the property belongs.
|
Constructor and Description |
---|
PropertyReference(object<? extends _BaseObject_> instance,
java.lang.String property)
Constructor.
|
PropertyReference(object<? extends _BaseObject_> instance,
java.lang.String property,
int index)
Constructor.
|
PropertyReference(object<? extends _BaseObject_> instance,
java.lang.String property,
NumberType index)
Constructor.
|
PropertyReference(java.lang.String className,
java.lang.String property)
Constructor.
|
PropertyReference(java.lang.String className,
java.lang.String property,
int index)
Constructor.
|
PropertyReference(java.lang.String className,
java.lang.String property,
NumberType index)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BaseDataType |
get()
Get a copy of the referenced object's current runtime value (this does not return the
original instance itself).
|
java.lang.Integer |
getExtent()
Get the property's extent.
|
java.lang.Integer |
getIndex()
Get the property accessor index.
|
java.lang.Class |
getType()
Report the return type expected from resolving the object.
|
private void |
init()
Resolve the property's type and the legacy getter and setter.
|
BaseDataType |
resolve()
Resolve this object to its current runtime value.
|
void |
set(BaseDataType val)
Set the referenced object's current runtime value to the given value.
|
<T extends BaseDataType> |
wrap(boolean io)
Wrap a class property (used as an OUTPUT or INPUT-OUTPUT argument), so that it can be
updated when the call returns.
|
private java.lang.String className
private object<? extends _BaseObject_> instance
private java.lang.String property
private int64 index
private java.lang.Integer extent
private java.lang.Class<? extends _BaseObject_> type
private java.lang.Class<? extends BaseDataType> propType
private InternalEntry getter
private InternalEntry setter
private _BaseObject_ reference
public PropertyReference(java.lang.String className, java.lang.String property)
className
- The class name in case of static property access.property
- Name of class property member.public PropertyReference(object<? extends _BaseObject_> instance, java.lang.String property)
instance
- The class instance, for instance property access.property
- Name of class property member.public PropertyReference(java.lang.String className, java.lang.String property, NumberType index)
className
- The class name in case of static property access.property
- Name of class property member.index
- Index to pass to property's getter method at resolve time.public PropertyReference(java.lang.String className, java.lang.String property, int index)
className
- The class name in case of static property access.property
- Name of class property member.index
- Index to pass to property's getter method at resolve time.public PropertyReference(object<? extends _BaseObject_> instance, java.lang.String property, int index)
instance
- The class instance, for instance property access.property
- Name of class property member.index
- Index to pass to property's getter method at resolve time.public PropertyReference(object<? extends _BaseObject_> instance, java.lang.String property, NumberType index)
instance
- The class instance, for instance property access.property
- Name of class property member.index
- Index to pass to property's getter method at resolve time.public java.lang.Integer getIndex()
index
.public java.lang.Integer getExtent()
extent
.private void init()
public BaseDataType get()
public void set(BaseDataType val)
public BaseDataType resolve()
resolve
in interface Resolvable
public java.lang.Class getType()
getType
in interface Resolvable
BaseDataType
.public <T extends BaseDataType> T wrap(boolean io)
io
- Flag indicating the argument is INPUT-OUTPUT or just OUTPUT.