|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReflectionField
A wrapper around Field
allowing different implementation of it.
Method Summary | |
---|---|
Object |
get(Object obj)
|
Class<?> |
getDeclaringClass()
Returns the Class object representing the class or interface
that declares the field represented by this Field object. |
Field |
getField()
Returns the wrapped field. |
Type |
getGenericType()
Returns a Type object that represents the declared type for the field represented by this Field object. |
int |
getModifiers()
Returns the Java language modifiers for the field represented by this Field object, as an integer. |
String |
getName()
Returns the name of the field represented by this Field object. |
Class<?> |
getType()
Returns a Class object that identifies the
declared type for the field represented by this
Field object. |
void |
set(Object obj,
Object value)
|
Method Detail |
---|
Object get(Object obj) throws IllegalArgumentException, IllegalAccessException
IllegalArgumentException
IllegalAccessException
void set(Object obj, Object value) throws IllegalArgumentException, IllegalAccessException
IllegalArgumentException
IllegalAccessException
String getName()
Field
object.
Class<?> getDeclaringClass()
Class
object representing the class or interface
that declares the field represented by this Field
object.
int getModifiers()
Field
object, as an integer. The Modifier
class should
be used to decode the modifiers.
Modifier
Class<?> getType()
Class
object that identifies the
declared type for the field represented by this
Field
object.
Class
object identifying the declared
type of the field represented by this objectType getGenericType()
If the Type is a parameterized type, the Type object returned must accurately reflect the actual type parameters used in the source code.
If an the type of the underlying field is a type variable or a parameterized type, it is created. Otherwise, it is resolved.
GenericSignatureFormatError
- if the generic field
signature does not conform to the format specified in the Java
Virtual Machine Specification, 3rd edition
TypeNotPresentException
- if the generic type
signature of the underlying field refers to a non-existent
type declaration
MalformedParameterizedTypeException
- if the generic
signature of the underlying field refers to a parameterized type
that cannot be instantiated for any reasonField getField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |