next up previous contents
Next: Compiling Pascal Up: Descriptors Previous: Field Descriptors

Method Descriptors

Method descriptors are used to represent methods. They describe the types of the parameters and the return type and are constructed according to the following grammar:

MethodDescriptor: ( ParameterDescriptor* ) ReturnDescriptor

ParameterDescriptor: FieldType

ReturnDescriptor: FieldType | V

A return type of V indicates that the method is of type void.

For example the method

int Sum(int a, int b)

is described by the descriptor

(II)I

The method

void Main(String[] args)

is described by the descriptor

([Ljava/lang/String;)V



mark@bottom.xs4all.nl