Errai 3.0.1-SNAPSHOT

org.jboss.errai.codegen.meta.impl.java
Class JavaReflectionField

java.lang.Object
  extended by org.jboss.errai.codegen.meta.MetaField
      extended by org.jboss.errai.codegen.meta.impl.java.JavaReflectionField
All Implemented Interfaces:
HasAnnotations, MetaClassMember

public class JavaReflectionField
extends MetaField


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.errai.codegen.meta.MetaField
MetaField.ArrayLengthMetaField
 
Constructor Summary
JavaReflectionField(Field field)
           
 
Method Summary
 Field asField()
          Returns the java.lang.reflect.Field object representing this MetaField.
<A extends Annotation>
A
getAnnotation(Class<A> annotation)
           
 Annotation[] getAnnotations()
          Returns the annotations present on this field.
 MetaClass getDeclaringClass()
           
 MetaType getGenericType()
          Returns the actual unerased type of this field, which could be a MetaClass (class, enum, interface, array, primitive, etc), a bounded or unbounded type variable, or a wildcard.
 String getName()
          Returns this field's name without any type information or qualifiers.
 MetaClass getType()
          Returns an actual MetaClass (a class, interface, primitive type, array, or enum, but not a type variable or a wildcard) representing an erased type that is assignable to this field.
 boolean isAbstract()
           
 boolean isAnnotationPresent(Class<? extends Annotation> annotation)
           
 boolean isFinal()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isSynchronized()
           
 boolean isSynthetic()
           
 boolean isTransient()
           
 boolean isVolatile()
           
 
Methods inherited from class org.jboss.errai.codegen.meta.MetaField
equals, hashCode, hashString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaReflectionField

public JavaReflectionField(Field field)
Method Detail

getName

public String getName()
Description copied from class: MetaField
Returns this field's name without any type information or qualifiers.

Specified by:
getName in interface MetaClassMember
Specified by:
getName in class MetaField
Returns:
The field name. Never null.

getType

public MetaClass getType()
Description copied from class: MetaField
Returns an actual MetaClass (a class, interface, primitive type, array, or enum, but not a type variable or a wildcard) representing an erased type that is assignable to this field.

Specified by:
getType in class MetaField
Returns:
a MetaClass representing a type that is assignable to this field. Never null.
See Also:
MetaField.getGenericType()

getAnnotations

public Annotation[] getAnnotations()
Description copied from class: MetaField
Returns the annotations present on this field.

Specified by:
getAnnotations in interface HasAnnotations
Specified by:
getAnnotations in class MetaField
Returns:
A shared reference to the array of the annotations on this field. Returns an empty array (never null) if the field has no annotations. Callers should refrain from modifying the returned array.

getAnnotation

public final <A extends Annotation> A getAnnotation(Class<A> annotation)

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotation)

getGenericType

public MetaType getGenericType()
Description copied from class: MetaField
Returns the actual unerased type of this field, which could be a MetaClass (class, enum, interface, array, primitive, etc), a bounded or unbounded type variable, or a wildcard. Unlike with MetaField.getType(), any type parameters on the field's type will be preserved in the returned MetaType object.

Specified by:
getGenericType in class MetaField
Returns:
The field type as declared. Never null.

getDeclaringClass

public MetaClass getDeclaringClass()

isAbstract

public boolean isAbstract()

isPublic

public boolean isPublic()

isPrivate

public boolean isPrivate()

isProtected

public boolean isProtected()

isFinal

public boolean isFinal()

isStatic

public boolean isStatic()

isTransient

public boolean isTransient()

isVolatile

public boolean isVolatile()

isSynthetic

public boolean isSynthetic()

isSynchronized

public boolean isSynchronized()

asField

public Field asField()
Description copied from class: MetaField
Returns the java.lang.reflect.Field object representing this MetaField.

Overrides:
asField in class MetaField
Returns:
The Java Reflection Field object representing the same field as this MetaField. Never null.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.