Field - JRE Emulation | JRE Emulation
public class

Field

extends AccessibleObject
implements Member
java.lang.Object
   ↳ java.lang.reflect.AccessibleObject
     ↳ java.lang.reflect.Field

Class Overview

Stub implementation of Field. The actual implementation is in Field.h and Field.m, so the declared fields in this class should match the actual fields implemented in order to catch unsupported API references.

See Also

Summary

[Expand]
Inherited Constants
From interface java.lang.reflect.Member
Public Constructors
Field()
Public Methods
Object get(Object o)
<T extends Annotation> T getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.
boolean getBoolean(Object o)
byte getByte(Object o)
char getChar(Object o)
Annotation[] getDeclaredAnnotations()
Returns annotations that are directly present on this element.
Class<?> getDeclaringClass()
Returns the class that declares this member.
double getDouble(Object o)
float getFloat(Object o)
Type getGenericType()
int getInt(Object o)
long getLong(Object o)
int getModifiers()
Returns the modifiers for this member.
String getName()
Returns the name of this member.
short getShort(Object o)
Class<?> getType()
boolean isEnumConstant()
boolean isSynthetic()
Indicates whether or not this member is synthetic (artificially introduced by the compiler).
void set(Object o, Object value)
void setBoolean(Object o, boolean b)
void setByte(Object o, byte b)
void setChar(Object o, char c)
void setDouble(Object o, double d)
void setFloat(Object o, float f)
void setInt(Object o, int i)
void setLong(Object o, long l)
void setShort(Object o, short s)
String toGenericString()
Inherited Methods
[Expand]
From class java.lang.reflect.AccessibleObject
From class java.lang.Object
From interface java.lang.reflect.AnnotatedElement
From interface java.lang.reflect.Member

Public Constructors

public Field ()

Public Methods

public T getAnnotation (Class<T> annotationClass)

Returns this element's annotation for the specified type if such an annotation is present, else null.

Parameters
annotationClass the Class object corresponding to the annotation type
Returns
  • this element's annotation for the specified annotation type if present on this element, else null

public boolean getBoolean (Object o)

public byte getByte (Object o)

public char getChar (Object o)

public Annotation[] getDeclaredAnnotations ()

Returns annotations that are directly present on this element. This method ignores inherited annotations. If there are no annotations directly present on this element, the return value is an array of length 0. The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers.

Returns
  • annotations directly present on this element

public Class<?> getDeclaringClass ()

Returns the class that declares this member.

Returns
  • the declaring class

public double getDouble (Object o)

public float getFloat (Object o)

public Type getGenericType ()

public long getLong (Object o)

public int getModifiers ()

Returns the modifiers for this member. The Modifier class should be used to decode the result.

Returns
  • the modifiers for this member

public String getName ()

Returns the name of this member.

Returns
  • the name of this member

public short getShort (Object o)

public Class<?> getType ()

public boolean isEnumConstant ()

public boolean isSynthetic ()

Indicates whether or not this member is synthetic (artificially introduced by the compiler).

Returns
  • true if this member is synthetic, false otherwise

public void set (Object o, Object value)

public void setBoolean (Object o, boolean b)

public void setByte (Object o, byte b)

public void setChar (Object o, char c)

public void setDouble (Object o, double d)

public void setFloat (Object o, float f)

public void setInt (Object o, int i)

public void setLong (Object o, long l)

public void setShort (Object o, short s)

public String toGenericString ()