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

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

org.netbeans.modules.classfile/1 1.19

org.netbeans.modules.classfile
Class Variable

java.lang.Object
  extended by org.netbeans.modules.classfile.Field
      extended by org.netbeans.modules.classfile.Variable

public final class Variable
extends Field

A Java field. Unfortunately, the word "field" is generally used in the Java documentation to mean either a variable, or both variables and methods. This class only describes variables.


Method Summary
 Object getConstantValue()
          Returns the value object of this variable if it is a constant, otherwise null.
 String getDeclaration()
          Return a string in the form " ".
 Object getValue()
          Deprecated. replaced by Object getConstantValue().
 boolean isConstant()
          Returns true if the variable is a constant; that is, a final static variable.
 boolean isEnumConstant()
          Returns true if this field defines an enum constant.
 String toString()
           
 
Methods inherited from class org.netbeans.modules.classfile.Field
getAccess, getAnnotation, getAnnotations, getAttributes, getClassFile, getDescriptor, getName, getTypeSignature, isAnnotationPresent, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isConstant

public final boolean isConstant()
Returns true if the variable is a constant; that is, a final static variable.

See Also:
getConstantValue()

getValue

@Deprecated
public final Object getValue()
Deprecated. replaced by Object getConstantValue().

Returns the value object of this variable if it is a constant, otherwise null.


getConstantValue

public final Object getConstantValue()
Returns the value object of this variable if it is a constant, otherwise null.

See Also:
isConstant()

getDeclaration

public final String getDeclaration()
Return a string in the form " ". Class types are shown in a "short" form; i.e. "Object" instead of "java.lang.Object"j.

Specified by:
getDeclaration in class Field
Returns:
string describing the variable and its type.

isEnumConstant

public final boolean isEnumConstant()
Returns true if this field defines an enum constant.


toString

public String toString()
Overrides:
toString in class Field

org.netbeans.modules.classfile/1 1.19

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