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

## bsh
Class BshMethod

    java.lang.Object
      bsh.BshMethod

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  DelayedEvalBshMethod

public class BshMethod
extends java.lang.Object
implements java.io.Serializable

This represents an instance of a bsh method declaration in a particular namespace. This is a thin wrapper around the BSHMethodDeclaration with a pointer to the declaring namespace.

When a method is located in a subordinate namespace or invoked from an arbitrary namespace it must nontheless execute with its 'super' as the context in which it was declared.

See Also:
  Serialized Form

Method Summary
`Modifiers` | `getModifiers()`
`java.lang.String` | `getName()`
`java.lang.String[]` | `getParameterNames()`
`java.lang.Class[]` | `getParameterTypes()` Get the argument types of this method.
`java.lang.Class` | `getReturnType()` Get the return type of the method.
`boolean` | `hasModifier(java.lang.String name)`
`java.lang.Object` | `invoke(java.lang.Object[] argValues, Interpreter interpreter)` Invoke the declared method with the specified arguments and interpreter reference.
`java.lang.Object` | `invoke(java.lang.Object[] argValues, Interpreter interpreter, CallStack callstack)` Invoke the declared method with the specified arguments, interpreter reference, and callstack.
`java.lang.Object` | `invoke(java.lang.Object[] argValues, Interpreter interpreter, CallStack callstack, bsh.SimpleNode callerInfo)`
`java.lang.String` | `toString()`

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

Method Detail

### getParameterTypes

    public java.lang.Class[] getParameterTypes()

  Get the argument types of this method. loosely typed (untyped) arguments will be represented by null argument types.

### getParameterNames

    public java.lang.String[] getParameterNames()

### getReturnType

    public java.lang.Class getReturnType()

  Get the return type of the method.

  Returns:
    Returns null for a loosely typed return value, Void.TYPE for a void return type, or the Class of the type.

### getModifiers

    public Modifiers getModifiers()

### getName

    public java.lang.String getName()

### invoke

    public java.lang.Object invoke(java.lang.Object[] argValues,
                                   Interpreter interpreter)
                            throws EvalError

  Invoke the declared method with the specified arguments and interpreter reference. This is the simplest form of invoke() for BshMethod intended to be used in reflective style access to bsh scripts.

  Throws:
    `EvalError`

### invoke

    public java.lang.Object invoke(java.lang.Object[] argValues,
                                   Interpreter interpreter,
                                   CallStack callstack)
                            throws EvalError

  Invoke the declared method with the specified arguments, interpreter reference, and callstack.

  Note: this form of invoke() uses a null Node for the caller and a null node for the CallStack. This method is for scripts performing relective style access to scripted methods.

  Throws:
    `EvalError`

### invoke

    public java.lang.Object invoke(java.lang.Object[] argValues,
                                   Interpreter interpreter,
                                   CallStack callstack,
                                   bsh.SimpleNode callerInfo)
                            throws EvalError

  Throws:
    `EvalError`

### hasModifier

    public boolean hasModifier(java.lang.String name)

### toString

    public java.lang.String toString()

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