Java Annotation Indexer 1.0.0.Final-redhat-1

org.jboss.jandex
Class FieldInfo

java.lang.Object
  extended by org.jboss.jandex.FieldInfo
All Implemented Interfaces:
AnnotationTarget

public final class FieldInfo
extends Object
implements AnnotationTarget

Represents a field that was annotated.

Thread-Safety

This class is immutable and can be shared between threads without safe publication.

Author:
Jason T. Greene

Method Summary
static FieldInfo create(ClassInfo clazz, String name, Type type, short flags)
          Construct a new mock Field instance.
 ClassInfo declaringClass()
          Returns the class which declared the field
 short flags()
          Returns the access fields of this field.
 String name()
          Returns the local name of the field
 String toString()
           
 Type type()
          Returns the Java Type of this field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static final FieldInfo create(ClassInfo clazz,
                                     String name,
                                     Type type,
                                     short flags)
Construct a new mock Field instance.

Parameters:
clazz - the class declaring the field
name - the name of the field
type - the Java field type
flags - the field attributes
Returns:
a mock field

name

public final String name()
Returns the local name of the field

Returns:
the local name of the field

declaringClass

public final ClassInfo declaringClass()
Returns the class which declared the field

Returns:
the declaring class

type

public final Type type()
Returns the Java Type of this field.

Returns:
the type

flags

public final short flags()
Returns the access fields of this field. Modifier can be used on this value.

Returns:
the access flags of this field

toString

public String toString()
Overrides:
toString in class Object

Java Annotation Indexer 1.0.0.Final-redhat-1

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