Class GenericMethod

java.lang.Object
  |
  +--GenericMethod

class GenericMethod
extends java.lang.Object

A GenericMethod is the collection of all methods with the same name and signature. The concept applies only to non-static methods. Implementing and overriding can only take place within the methods of one generic method.


Field Summary
(package private) static java.util.Hashtable allGenerics
          a static hashtable String -> GenericMethod, referencing all GenericMethods via their genericName.
(package private)  java.lang.String genericName
          method name + signature, identifies one generic method.
(package private)  Klass[] instantiatedClasses
          all instantiated classes that this generic method applies to.
(package private)  java.util.Vector methods
          the individual methods of this generic method.
(package private)  java.lang.String name
          method name
(package private)  boolean needsVtable
          flag: this generic method needs a vtable.
(package private)  java.lang.String signature
          method signature (args and return type)
(package private)  int vtableIndex
          the vtable index for this generic method.
 
Constructor Summary
private GenericMethod(java.lang.String name, java.lang.String signature)
          constructs an empty GenericMethod.
 
Method Summary
(package private)  void addMethod(MethodInfo method)
          adds a method to this generic method.
(package private)  void assignVtableIndex()
          compute the vtable index for this class and register it.
 void compute()
          compute the dependent fields of this GenericMethod object.
(package private) static java.util.Enumeration elements()
          returns an Enumeration of all generic methods.
(package private) static GenericMethod forName(java.lang.String name, java.lang.String signature)
          finds or constructs the GenericMethod for the given name and signature.
(package private) static GenericMethod register(MethodInfo method)
          registers a method with its generic method.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

allGenerics

static java.util.Hashtable allGenerics
a static hashtable String -> GenericMethod, referencing all GenericMethods via their genericName.

genericName

java.lang.String genericName
method name + signature, identifies one generic method.

name

java.lang.String name
method name

signature

java.lang.String signature
method signature (args and return type)

methods

java.util.Vector methods
the individual methods of this generic method.

instantiatedClasses

Klass[] instantiatedClasses
all instantiated classes that this generic method applies to.

This field is set in the 'compute' method. After that point, changes in the 'methods' field or in the class tree are illegal.


needsVtable

boolean needsVtable
flag: this generic method needs a vtable.

This field is set in the 'compute' method. After that point, changes in the 'methods' field or in the class tree are illegal.


vtableIndex

int vtableIndex
the vtable index for this generic method. This field is set in the 'assignVtableIndex' method.
Constructor Detail

GenericMethod

private GenericMethod(java.lang.String name,
                      java.lang.String signature)
constructs an empty GenericMethod.
Method Detail

forName

static GenericMethod forName(java.lang.String name,
                             java.lang.String signature)
finds or constructs the GenericMethod for the given name and signature.

elements

static java.util.Enumeration elements()
returns an Enumeration of all generic methods.

addMethod

void addMethod(MethodInfo method)
adds a method to this generic method.

register

static GenericMethod register(MethodInfo method)
registers a method with its generic method.

compute

public void compute()
compute the dependent fields of this GenericMethod object.

assignVtableIndex

void assignVtableIndex()
compute the vtable index for this class and register it. The vtable index is registered in this GenericMethod, in all its individual methods, and in all related classes with instances.