Field provides information about, and dynamic access to, a single field of a class or an interface.
More...
#include <java_lang_reflect_Field.h>
Inheritance diagram for java::lang::reflect::Field:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::reflect::Field > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::reflect::Field > > | array2D |
Public Member Functions | |
| bool | equals (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares this Field against the specified object. | |
| Field (const ::java::lang::Class &declaringClass, const ::java::lang::String &name, const ::java::lang::Class &type, jint modifiers, jint slot,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
| Package-private constructor used by ReflectAccess to enable instantiation of these objects in Java code from the java.lang package via sun.reflect.LangReflectAccess. | |
| ::java::lang::Object | get (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of the field represented by this Field, on the specified object. | |
| bool | getBoolean (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Gets the value of a static or instance boolean field. | |
| jbyte | getByte (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Gets the value of a static or instance byte field. | |
| jchar | getChar (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| ::java::lang::Class | getDeclaringClass (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the Class object representing the class or interface that declares the field represented by this Field object. | |
| jdouble | getDouble (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| jfloat | getFloat (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| jint | getInt (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| jlong | getLong (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| jint | getModifiers (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the Java language modifiers for the field represented by this Field object, as an integer. | |
| ::java::lang::String | getName (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the name of the field represented by this Field object. | |
| jshort | getShort (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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. | |
| ::java::lang::Class | getType (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a Class object that identifies the declared type for the field represented by this Field object. | |
| jint | hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a hashcode for this Field. | |
| void | set (const ::java::lang::Object &obj, const ::java::lang::Object &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the field represented by this Field object on the specified object argument to the specified new value. | |
| void | setBoolean (const ::java::lang::Object &obj, bool z,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a boolean on the specified object. | |
| void | setByte (const ::java::lang::Object &obj, jbyte b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a byte on the specified object. | |
| void | setChar (const ::java::lang::Object &obj, jchar c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a char on the specified object. | |
| void | setDouble (const ::java::lang::Object &obj, jdouble d,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a double on the specified object. | |
| void | setFloat (const ::java::lang::Object &obj, jfloat f,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a float on the specified object. | |
| void | setInt (const ::java::lang::Object &obj, jint i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as an int on the specified object. | |
| void | setLong (const ::java::lang::Object &obj, jlong l,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a long on the specified object. | |
| void | setShort (const ::java::lang::Object &obj, jshort s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the value of a field as a short on the specified object. | |
| ::java::lang::String | toString (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string describing this Field. | |
Field provides information about, and dynamic access to, a single field of a class or an interface.
The reflected field may be a class (static) field or an instance field.
A Field permits widening conversions to occur during a get or set access operation, but throws an IllegalArgumentException if a narrowing conversion would occur.
Nakul Saraiya
|
||||||||||||||||||||||||||||||||
|
Package-private constructor used by ReflectAccess to enable instantiation of these objects in Java code from the java.lang package via sun.reflect.LangReflectAccess.
|
|
||||||||||||||||
|
Compares this
Returns true if the objects are the same. Two
Reimplemented from java::lang::Object. |
|
||||||||||||||||
|
Returns the value of the field represented by this The value is automatically wrapped in an object if it has a primitive type. The underlying field's value is obtained as follows:
If the underlying field is a static field, the
Otherwise, the underlying field is an instance field. If the specified
If this Otherwise, the value is retrieved from the underlying instance or static field. If the field has a primitive type, the value is wrapped in an object before being returned, otherwise it is returned as is.
If the field is hidden in the type of
|
|
||||||||||||||||
|
Gets the value of a static or instance
|
|
||||||||||||||||
|
Gets the value of a static or instance
|
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||
|
Returns the
Reimplemented from java::lang::reflect::Member. |
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||
|
Returns the Java language modifiers for the field represented by this
The
Reimplemented from java::lang::reflect::Member. |
|
||||||||||||
|
Returns the name of the field represented by this
Reimplemented from java::lang::reflect::Member. |
|
||||||||||||||||
|
Gets the value of a static or instance field of type
|
|
||||||||||||
|
Returns a
|
|
||||||||||||
|
Returns a hashcode for this This is computed as the exclusive-or of the hashcodes for the underlying field's declaring class name and its name.
Reimplemented from java::lang::Object. |
|
||||||||||||||||||||
|
Sets the field represented by this The new value is automatically unwrapped if the underlying field has a primitive type. The operation proceeds as follows:
If the underlying field is static, the
Otherwise the underlying field is an instance field. If the specified object argument is null, the method throws a
If this
If the underlying field is final, the method throws an
If the underlying field is of a primitive type, an unwrapping conversion is attempted to convert the new value to a value of a primitive type. If this attempt fails, the method throws an
If, after possible unwrapping, the new value cannot be converted to the type of the underlying field by an identity or widening conversion, the method throws an If the underlying field is static, the class that declared the field is initialized if it has not already been initialized. The field is set to the possibly unwrapped and widened new value.
If the field is hidden in the type of
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as an
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||||||||||
|
Sets the value of a field as a
This method is equivalent to
|
|
||||||||||||
|
Returns a string describing this The format is the access modifiers for the field, if any, followed by the field type, followed by a space, followed by the fully-qualified name of the class declaring the field, followed by a period, followed by the name of the field. For example:
public static final int java.lang.Thread.MIN_PRIORITY private int java.io.FileDescriptor.fd
The modifiers are placed in canonical order as specified by "The Java Language Specification". This is
Reimplemented from java::lang::Object. |
1.4.1