| java.lang.Object bsh.BshMethod
All known Subclasses: bsh.DelayedEvalBshMethod,
BshMethod | public class BshMethod implements java.io.Serializable(Code) | | 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.
|
Method Summary | |
public Modifiers | getModifiers() | public String | getName() | public String[] | getParameterNames() | public Class[] | getParameterTypes() Get the argument types of this method. | public Class | getReturnType() Get the return type of the method. | public boolean | hasModifier(String name) | public Object | invoke(Object[] argValues, Interpreter interpreter) Invoke the declared method with the specified arguments and interpreter
reference. | public Object | invoke(Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo) 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.
Parameters: callerInfo - is the BeanShell AST node representing the method invocation. | 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.
Parameters: callerInfo - is the BeanShell AST node representing the method invocation. | public String | toString() |
getParameterTypes | public Class[] getParameterTypes()(Code) | | Get the argument types of this method.
loosely typed (untyped) arguments will be represented by null argument
types.
|
getReturnType | public Class getReturnType()(Code) | | Get the return type of the method.
Returns null for a loosely typed return value, Void.TYPE for a void return type, or the Class of the type. |
invoke | public Object invoke(Object[] argValues, Interpreter interpreter) throws EvalError(Code) | | 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.
|
invoke | public Object invoke(Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo) throws EvalError(Code) | | 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.
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 errormessages may not be able to point to the precise location and textof the error. Parameters: callstack - is the callstack. If callstack is null a new onewill be created with the declaring namespace of the method on topof 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). |
invoke | Object invoke(Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo, boolean overrideNameSpace) throws EvalError(Code) | | 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.
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 errormessages may not be able to point to the precise location and textof the error. Parameters: callstack - is the callstack. If callstack is null a new onewill be created with the declaring namespace of the method on topof 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). Parameters: overrideNameSpace - When true the method is executed in the namespace on the top of thestack instead of creating its own local namespace. This allows itto be used in constructors. |
|
|