Java java.lang.reflect Field fields, constructors, methods, implement or subclass

Example usage for Java java.lang.reflect Field fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.lang.reflect Field.

The text is from its open source code.

Subclass

java.lang.reflect.Field has subclasses.
Click this link to see all its subclasses.

Field

Stringname

Method

booleanequals(Object obj)
Compares this Field against the specified object.
Objectget(Object obj)
Returns the value of the field represented by this Field , on the specified object.
AnnotatedTypegetAnnotatedType()
Returns an AnnotatedType object that represents the use of a type to specify the declared type of the field represented by this Field.
TgetAnnotation(Class annotationClass)
Annotation[]getAnnotations()
T[]getAnnotationsByType(Class annotationClass)
booleangetBoolean(Object obj)
Gets the value of a static or instance boolean field.
bytegetByte(Object obj)
Gets the value of a static or instance byte field.
chargetChar(Object obj)
Gets the value of a static or instance field of type char or of another primitive type convertible to type char via a widening conversion.
ClassgetClass()
Returns the runtime class of this Object .
TgetDeclaredAnnotation(Class annotationClass)
Annotation[]getDeclaredAnnotations()
ClassgetDeclaringClass()
Returns the Class object representing the class or interface that declares the field represented by this Field object.
doublegetDouble(Object obj)
Gets the value of a static or instance field of type double or of another primitive type convertible to type double via a widening conversion.
floatgetFloat(Object obj)
Gets the value of a static or instance field of type float or of another primitive type convertible to type float via a widening conversion.
TypegetGenericType()
Returns a Type object that represents the declared type for the field represented by this Field object.
intgetInt(Object obj)
Gets the value of a static or instance field of type int or of another primitive type convertible to type int via a widening conversion.
longgetLong(Object obj)
Gets the value of a static or instance field of type long or of another primitive type convertible to type long via a widening conversion.
intgetModifiers()
Returns the Java language modifiers for the field represented by this Field object, as an integer.
StringgetName()
Returns the name of the field represented by this Field object.
shortgetShort(Object obj)
Gets the value of a static or instance field of type short or of another primitive type convertible to type short via a widening conversion.
ClassgetType()
Returns a Class object that identifies the declared type for the field represented by this Field object.
inthashCode()
Returns a hashcode for this Field .
booleanisAccessible()
Get the value of the accessible flag for this reflected object.
booleanisAnnotationPresent(Class annotationClass)
booleanisEnumConstant()
Returns true if this field represents an element of an enumerated type; returns false otherwise.
booleanisSynthetic()
Returns true if this field is a synthetic field; returns false otherwise.
voidset(Object obj, Object value)
Sets the field represented by this Field object on the specified object argument to the specified new value.
voidsetAccessible(boolean flag)
voidsetBoolean(Object obj, boolean z)
Sets the value of a field as a boolean on the specified object.
voidsetByte(Object obj, byte b)
Sets the value of a field as a byte on the specified object.
voidsetChar(Object obj, char c)
Sets the value of a field as a char on the specified object.
voidsetDouble(Object obj, double d)
Sets the value of a field as a double on the specified object.
voidsetFloat(Object obj, float f)
Sets the value of a field as a float on the specified object.
voidsetInt(Object obj, int i)
Sets the value of a field as an int on the specified object.
voidsetLong(Object obj, long l)
Sets the value of a field as a long on the specified object.
voidsetShort(Object obj, short s)
Sets the value of a field as a short on the specified object.
StringtoGenericString()
Returns a string describing this Field , including its generic type.
StringtoString()
Returns a string describing this Field .