next up previous contents
Next: Other classes in the Up: The API Previous: java.lang.reflect.Field   Contents

java.lang.reflect.Method

Again, can only obtain instances of this class through Class::getMethod().

Implementation: the class contains private variables:

    private Class               clazz;          // declaring class
    private int                 slot;           // ???
    private String              name;           // name of method
    private Class               returnType;     // ...
    private Class[]             parameterTypes;
    private Class[]             exceptionTypes;
    private int                 modifiers;

The invoke() method is native. It sets up the stack, frame, etc. and executes the method code.



Nadeem Hamid 2000-07-24