: Class LocalMethod

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.jel.reflect
Class LocalMethod

    java.lang.Object
      |
      +--gnu.jel.reflect.LocalField
            |
            +--gnu.jel.reflect.LocalMethod

All Implemented Interfaces:
  java.lang.reflect.Member, Member

Direct Known Subclasses:
  Method

public class LocalMethod
extends LocalField

Represents a method local to the class being compiled.

Fields inherited from class gnu.jel.reflect.LocalField
`modifiers`

Fields inherited from interface java.lang.reflect.Member
`DECLARED, PUBLIC`

Constructor Summary
`LocalMethod(int modifiers, java.lang.Class type, java.lang.String name, java.lang.Class[] paramTypes, java.lang.Class[] exceptions)` Constructs a new local method.

Method Summary
`void` | `code(ClassFile cf)` Generates the code for loading this field to stack.
`boolean` | `equals(java.lang.Object o)`
`java.lang.Class[]` | `getExceptionTypes()` Used to get checked exceptions thrown by this method
`java.lang.Class[]` | `getParameterTypes()` Used to get types and number of parameters needed to evaluate this member.

Methods inherited from class gnu.jel.reflect.LocalField
`eval, getDeclaringClass, getModifiers, getName, getType, getTypeID`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalMethod

    public LocalMethod(int modifiers,
                       java.lang.Class type,
                       java.lang.String name,
                       java.lang.Class[] paramTypes,
                       java.lang.Class[] exceptions)

  Constructs a new local method.
  Parameters:
    `modifiers` - sum of one or more of `PUBLIC`, `PRIVATE`, `PROTECTED`,`STATIC`, `FINAL`, `SYNCHRONIZED`, `NATIVE`, `ABSTRACT` constants of java.lang.reflect.Modifier .
    `type` - type of the return value.
    `name` - name of the method
    `paramTypes` - array of types of formal parameters.
    `exceptions` - checked exceptions thrown

Method Detail

### getParameterTypes

    public java.lang.Class[] getParameterTypes()

  Description copied from interface: `Member`
  Used to get types and number of parameters needed to evaluate this member.

  Is there are no parameters (like for fields) it returns an array of length zero.

  Overrides:
    `getParameterTypes` in class `LocalField`
  Following copied from interface: `gnu.jel.reflect.Member`
  Returns:
    the array of parameters of this member.

### getExceptionTypes

    public java.lang.Class[] getExceptionTypes()

  Used to get checked exceptions thrown by this method
  Returns:
    array of checked exceptions

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `LocalField`

### code

    public void code(ClassFile cf)

  Generates the code for loading this field to stack.

  For field/variable invoke means to get value. No type checks are performed.

  Overrides:
    `code` in class `LocalField`
  Parameters:
    `cf` - classfile to append instructions to.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD