站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Field (Classfile Reader) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.classfile/1 1.19

org.netbeans.modules.classfile
Class Field

java.lang.Object
  extended by org.netbeans.modules.classfile.Field
Direct Known Subclasses:
Method, Parameter, Variable

public abstract class Field
extends Object

Base class for variables and methods.


Method Summary
 int getAccess()
           
 Annotation getAnnotation(ClassName annotationClass)
          Returns the annotation for a specified annotation type, or null if no annotation of that type exists for this field.
 Collection<Annotation> getAnnotations()
          Returns all runtime annotations defined for this field.
 AttributeMap getAttributes()
          Returns a map of the raw attributes for this field.
 ClassFile getClassFile()
          Returns the class file this field is defined in.
abstract  String getDeclaration()
           
 String getDescriptor()
           
 String getName()
           
 String getTypeSignature()
          Returns the generic type information associated with this field.
 boolean isAnnotationPresent(ClassName annotationClass)
          Returns true if an annotation of the specified type is defined for this field.
 boolean isDeprecated()
           
 boolean isPackagePrivate()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isSynthetic()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public final String getName()

getDescriptor

public final String getDescriptor()

getDeclaration

public abstract String getDeclaration()

getAccess

public final int getAccess()

isStatic

public final boolean isStatic()

isPublic

public final boolean isPublic()

isProtected

public final boolean isProtected()

isPackagePrivate

public final boolean isPackagePrivate()

isPrivate

public final boolean isPrivate()

isDeprecated

public final boolean isDeprecated()

isSynthetic

public final boolean isSynthetic()

getClassFile

public final ClassFile getClassFile()
Returns the class file this field is defined in.

Returns:
the class file of this field.

getTypeSignature

public String getTypeSignature()
Returns the generic type information associated with this field. If this field does not have generic type information, then null is returned.


getAnnotations

public final Collection<Annotation> getAnnotations()
Returns all runtime annotations defined for this field. Inherited annotations are not included in this collection.


getAnnotation

public final Annotation getAnnotation(ClassName annotationClass)
Returns the annotation for a specified annotation type, or null if no annotation of that type exists for this field.


isAnnotationPresent

public final boolean isAnnotationPresent(ClassName annotationClass)
Returns true if an annotation of the specified type is defined for this field.


getAttributes

public final AttributeMap getAttributes()
Returns a map of the raw attributes for this field. The keys for this map are the names of the attributes (as Strings, not constant pool indexes). The values are byte arrays that hold the contents of the attribute. If the ClassFile was created with an includeCode parameter that is false, then Code attributes are not included in this map.

See Also:
ClassFile.getAttributes()

toString

public String toString()
Overrides:
toString in class Object

org.netbeans.modules.classfile/1 1.19

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.