JBoss Reflection 2.2.1.SP1

org.jboss.reflect.plugins.introspection
Class ReflectFieldInfoImpl

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.AnnotationHolder
              extended by org.jboss.reflect.plugins.FieldInfoImpl
                  extended by org.jboss.reflect.plugins.introspection.ReflectFieldInfoImpl
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, FieldInfo, MemberInfo, ModifierInfo, org.jboss.util.JBossInterface

public class ReflectFieldInfoImpl
extends FieldInfoImpl

A field info

Author:
Ales Justin, Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
protected  Field field
          The field, this only gets initialized after get(), set() or getField() has been called to save memory
 
Fields inherited from class org.jboss.reflect.plugins.FieldInfoImpl
declaringClass, hash, modifiers, name, type
 
Fields inherited from class org.jboss.reflect.plugins.AnnotationHolder
annotationMap, annotationsArray
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Fields inherited from interface org.jboss.reflect.spi.ModifierInfo
ABSTRACT, CONSTANT, FINAL, PACKAGE, PACKAGE_ABSTRACT, PACKAGE_CONSTANT, PACKAGE_STATIC, PRIVATE, PRIVATE_CONSTANT, PRIVATE_STATIC, PROTECTED, PROTECTED_ABSTRACT, PROTECTED_CONSTANT, PROTECTED_STATIC, PUBLIC, PUBLIC_ABSTRACT, PUBLIC_CONSTANT, PUBLIC_STATIC, STATIC
 
Constructor Summary
ReflectFieldInfoImpl()
          Create a new field info
ReflectFieldInfoImpl(AnnotationValue[] annotations, String name, TypeInfo type, int modifiers, ClassInfo declaring)
          Create a new FieldInfo.
 
Method Summary
protected  void accessCheck()
          Check access permission.
protected  void accessCheck(boolean isPublic)
          Check access permission.
 Object get(Object target)
          Get the value of the field
 Field getField()
          Get the field
 Object set(Object target, Object value)
          Set the value of the field
 void setField(Field field)
          Set the field
 
Methods inherited from class org.jboss.reflect.plugins.FieldInfoImpl
calculateHash, equals, getDeclaringClass, getModifiers, getName, getType, hashCode, isPublic, isStatic, isVolatile, toString
 
Methods inherited from class org.jboss.reflect.plugins.AnnotationHolder
getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations
 
Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.reflect.spi.AnnotatedInfo
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Field Detail

field

protected transient volatile Field field
The field, this only gets initialized after get(), set() or getField() has been called to save memory

Constructor Detail

ReflectFieldInfoImpl

public ReflectFieldInfoImpl()
Create a new field info


ReflectFieldInfoImpl

public ReflectFieldInfoImpl(AnnotationValue[] annotations,
                            String name,
                            TypeInfo type,
                            int modifiers,
                            ClassInfo declaring)
Create a new FieldInfo.

Parameters:
annotations - the annotations
name - the name
type - the field type
modifiers - the field modifiers
declaring - the declaring class
Method Detail

setField

public void setField(Field field)
Set the field

Parameters:
field - the field

getField

public Field getField()
Get the field

Returns:
the field

accessCheck

protected final void accessCheck()
Check access permission.


accessCheck

protected final void accessCheck(boolean isPublic)
Check access permission.

Parameters:
isPublic - whether the field is public

get

public Object get(Object target)
           throws Throwable
Description copied from interface: FieldInfo
Get the value of the field

Specified by:
get in interface FieldInfo
Overrides:
get in class FieldInfoImpl
Parameters:
target - the target
Returns:
the field value
Throws:
Throwable - for any error

set

public Object set(Object target,
                  Object value)
           throws Throwable
Description copied from interface: FieldInfo
Set the value of the field

Specified by:
set in interface FieldInfo
Overrides:
set in class FieldInfoImpl
Parameters:
target - the target
value - the value
Returns:
null
Throws:
Throwable - for any error

JBoss Reflection 2.2.1.SP1

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.