bsh
public class BshMethod extends Object implements Serializable
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.
Method Summary | |
---|---|
Class[] | getArgumentTypes()
Get the argument types of this method.
loosely typed (untyped) arguments will be represented by null argument
types. |
String | getName() |
Object | getReturnType()
Get the return type of the method. |
boolean | hasModifier(String name) |
Object | invoke(Object[] argValues, Interpreter interpreter)
Invoke the declared method with the specified arguments and interpreter
reference. |
Object | invoke(Object[] argValues, Interpreter interpreter, CallStack callstack)
Invoke the declared method with the specified arguments, interpreter
reference, and callstack.
|
Object | invoke(Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo) |
Object | invoke(Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo, boolean overrideNameSpace)
Invoke the bsh method with the specified args, interpreter ref,
and callstack.
callerInfo is the node representing the method invocation
It is used primarily for debugging in order to provide access to the
text of the construct that invoked the method through the namespace. |
String | toString() |
Returns: Returns null for a loosely typed return value, Primitive.VOID for a void return type, or the Class of the type.
Parameters: callerInfo is the BeanShell AST node representing the method invocation. It is used to print the line number and text of errors in EvalError exceptions. If the node is null here error messages may not be able to point to the precise location and text of the error. callstack is the callstack. If callstack is null a new one will be created with the declaring namespace of the method on top of the stack (i.e. it will look for purposes of the method invocation like the method call occurred in the declaring (enclosing) namespace in which the method is defined). overrideNameSpace When true the method is executed in the namespace on the top of the stack instead of creating its own local namespace. This allows it to be used in constructors.