Package bridge
Class Invocation.Accessor
java.lang.Object
bridge.Invocation.Accessor
- Enclosing class:
- Invocation
A class that is used to build field invocations
- Notes:
- Invocations must be constructed and completed in a single statement. Partial invocations may not be stored.
-
Method Summary
Modifier and TypeMethodDescription<@Polymorphic T>
Tget()
Gets the field value<@Polymorphic T>
TGets, then sets, the field value<T> T
set
(T value) Sets the field value<@Polymorphic T>
TSets, then gets, the field value
-
Method Details
-
get
Gets the field value- Type Parameters:
T
- Requested type- Returns:
- The current, real value the field holds.
- Throws:
NoSuchFieldError
- When no field with the provided description can be resolved.IllegalAccessError
- When the resolved field's access modifiers prevent it from being read.IncompatibleClassChangeError
- When the resolved field is accessed from the wrong context.NullPointerException
- When the resolved field is an instance field and the instance isnull
.ClassCastException
- When the field value is not convertible to the requested type.
-
getAndSet
Gets, then sets, the field value- Type Parameters:
T
- Requested type- Parameters:
value
- The new value the field will hold.- Returns:
- The previous, real value the field held.
- Throws:
NoSuchFieldError
- When no field with the provided description can be resolved.IllegalAccessError
- When the resolved field's access modifiers prevent it from being read or written to.IncompatibleClassChangeError
- When the resolved field is accessed from the wrong context.NullPointerException
- When the resolved field is an instance field and the instance isnull
.ClassCastException
- When the provided value is not convertible to the field type or the field value is not convertible to the requested type.
-
set
Sets the field value- Type Parameters:
T
- Requested type- Parameters:
value
- The new value the field will hold.- Returns:
- That same, real value, without any conversions.
- Throws:
NoSuchFieldError
- When no field with the provided description can be resolved.IllegalAccessError
- When the resolved field's access modifiers prevent it from being written to.IncompatibleClassChangeError
- When the resolved field is accessed from the wrong context.NullPointerException
- When the resolved field is an instance field and the instance isnull
.ClassCastException
- When the provided value is not convertible to the field type.
-
setAndGet
Sets, then gets, the field value- Type Parameters:
T
- Requested type- Parameters:
value
- The new value the field will hold.- Returns:
- That same, real value, with all required conversions applied.
- Throws:
NoSuchFieldError
- When no field with the provided description can be resolved.IllegalAccessError
- When the resolved field's access modifiers prevent it from being written to.IncompatibleClassChangeError
- When the resolved field is accessed from the wrong context.NullPointerException
- When the resolved field is an instance field and the instance isnull
.ClassCastException
- When the provided value is not convertible to the field type or the field value is not convertible to the requested type.
-