com.go.trove.classfile
Class MethodDescriptor

java.lang.Object
  |
  +--com.go.trove.classfile.Descriptor
        |
        +--com.go.trove.classfile.MethodDescriptor

public class MethodDescriptor
extends Descriptor

This class is used to build method descriptor strings as defined in The Java Virtual Machine Specification, section 4.3.3.

Version:
22 , 9/07/00
Author:
Brian S O'Neill

Constructor Summary
MethodDescriptor()
           
MethodDescriptor(TypeDescriptor ret, TypeDescriptor[] params)
          Used to construct a method descriptor for a method with a return type and parameters.
 
Method Summary
static java.lang.String generate()
           
static java.lang.String generate(TypeDescriptor ret, TypeDescriptor[] params)
          Used to generate a method descriptor for a method with a return type and parameters.
 int getParameterCount()
           
 TypeDescriptor[] getParameterTypes()
           
 TypeDescriptor getReturnType()
           
static MethodDescriptor parseMethodDesc(java.lang.String desc)
           
 java.lang.String toString()
          Returns the descriptor string.
 
Methods inherited from class com.go.trove.classfile.Descriptor
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodDescriptor

public MethodDescriptor()

MethodDescriptor

public MethodDescriptor(TypeDescriptor ret,
                        TypeDescriptor[] params)
Used to construct a method descriptor for a method with a return type and parameters.
Method Detail

getReturnType

public TypeDescriptor getReturnType()

getParameterCount

public int getParameterCount()

getParameterTypes

public TypeDescriptor[] getParameterTypes()

toString

public java.lang.String toString()
Description copied from class: Descriptor
Returns the descriptor string.
Overrides:
toString in class Descriptor

generate

public static java.lang.String generate()

generate

public static java.lang.String generate(TypeDescriptor ret,
                                        TypeDescriptor[] params)
Used to generate a method descriptor for a method with a return type and parameters.

parseMethodDesc

public static MethodDescriptor parseMethodDesc(java.lang.String desc)
                                        throws java.lang.IllegalArgumentException