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

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

org.netbeans.modules.classfile/1 1.19

org.netbeans.modules.classfile
Class Method

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

public final class Method
extends Field

A Java method object.


Method Summary
 ElementValue getAnnotationDefault()
          Returns the default annotation value for the element defined by this method.
 Code getCode()
          Get the bytecodes of this method.
 String getDeclaration()
           
 CPClassInfo[] getExceptionClasses()
           
 List<Parameter> getParameters()
          Returns the parameters for this method as a declaration-ordered list.
 String getReturnSignature()
          Returns the method's return type as it would be defined in Java source code format.
 String getReturnType()
          Returns the method's return type in the type format defined by the JVM Specification for Field Descriptors (section 4.3.2).
 boolean isAbstract()
          Returns true if this method is declared abstract.
 boolean isBridge()
          Returns true if this method is a generics bridge method defined by the compiler.
 boolean isNative()
          Returns true if this method is declared native.
 boolean isSynchronized()
          Returns true if this method is declared synchronized.
 boolean isVarArgs()
          Returns true if this method is declared with a variable number of arguments.
 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

getCode

public final Code getCode()
Get the bytecodes of this method. This method returns null if the method is abstract, or if the ClassFile instance was created with a includeCode parameter of false.

Returns:
the Code object, or null.

getExceptionClasses

public final CPClassInfo[] getExceptionClasses()

isBridge

public final boolean isBridge()
Returns true if this method is a generics bridge method defined by the compiler.


isVarArgs

public final boolean isVarArgs()
Returns true if this method is declared with a variable number of arguments.


isSynchronized

public final boolean isSynchronized()
Returns true if this method is declared synchronized.


isNative

public final boolean isNative()
Returns true if this method is declared native.


isAbstract

public final boolean isAbstract()
Returns true if this method is declared abstract.


getParameters

public final List<Parameter> getParameters()
Returns the parameters for this method as a declaration-ordered list.


getReturnType

public final String getReturnType()
Returns the method's return type in the type format defined by the JVM Specification for Field Descriptors (section 4.3.2).


getReturnSignature

public final String getReturnSignature()
Returns the method's return type as it would be defined in Java source code format.


getAnnotationDefault

public ElementValue getAnnotationDefault()
Returns the default annotation value for the element defined by this method. Null is returned if no default is specified for this element, or if the class that contains this method does not define an annotation type.


toString

public String toString()
Overrides:
toString in class Field

getDeclaration

public final String getDeclaration()
Specified by:
getDeclaration 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.