com.sun.xml.bind.v2.runtime.reflect
Class Accessor.FieldReflection<BeanT,ValueT>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT,ValueT>
com.sun.xml.bind.v2.runtime.reflect.Accessor.FieldReflection<BeanT,ValueT>
- All Implemented Interfaces:
- Receiver, java.security.PrivilegedAction<java.lang.Void>
- Direct Known Subclasses:
- Accessor.ReadOnlyFieldReflection
- Enclosing class:
- Accessor<BeanT,ValueT>
public static class Accessor.FieldReflection<BeanT,ValueT>
- extends Accessor<BeanT,ValueT>
- implements java.security.PrivilegedAction<java.lang.Void>
Accessor
that uses Java reflection to access a field.
Field Summary |
java.lang.reflect.Field |
f
|
Method Summary |
ValueT |
get(BeanT bean)
Gets the value of the property of the given bean object. |
Accessor<BeanT,ValueT> |
optimize()
Returns the optimized version of the same accessor. |
java.lang.Void |
run()
|
void |
set(BeanT bean,
ValueT value)
Sets the value of the property of the given bean object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
f
public final java.lang.reflect.Field f
Accessor.FieldReflection
public Accessor.FieldReflection(java.lang.reflect.Field f)
run
public java.lang.Void run()
- Specified by:
run
in interface java.security.PrivilegedAction<java.lang.Void>
get
public ValueT get(BeanT bean)
- Description copied from class:
Accessor
- Gets the value of the property of the given bean object.
- Specified by:
get
in class Accessor<BeanT,ValueT>
- Parameters:
bean
- must not be null.
set
public void set(BeanT bean,
ValueT value)
- Description copied from class:
Accessor
- Sets the value of the property of the given bean object.
- Specified by:
set
in class Accessor<BeanT,ValueT>
- Parameters:
bean
- must not be null.value
- the value to be set. Setting value to null means resetting
to the VM default value (even for primitive properties.)
optimize
public Accessor<BeanT,ValueT> optimize()
- Description copied from class:
Accessor
- Returns the optimized version of the same accessor.
- Overrides:
optimize
in class Accessor<BeanT,ValueT>
- Returns:
- At least the implementation can return this.