S
- the script interfaceR
- the result of the scriptpublic abstract class AbstractMethodProxy<S,R> extends java.lang.Object implements ScriptMethodProxy<S,R>
Modifier and Type | Field and Description |
---|---|
protected java.lang.reflect.Method |
m
The Method.
|
protected S |
script
The script.
|
protected ScriptWrapper<S> |
wrapper
The ScriptWrapper.
|
Constructor and Description |
---|
AbstractMethodProxy(ScriptWrapper<S> wrapper) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkDeclaredArguments(java.lang.String methodName,
java.lang.Class<?>... args)
Check if there is a method in the script which is consistent with a specification.
|
protected boolean |
checkRuntimeArguments(boolean noExceptionsThrown,
java.lang.Object... args)
Check the validity of the runtime arguments for the method.
|
protected java.lang.Object[] |
convertRuntimeArguments(java.lang.Object... args)
Convert the runtime arguments for the method.
|
ScriptWrapper<S> |
getScriptWrapper()
Return the ScriptWrapper.
|
protected void |
processException(java.lang.Throwable e)
Processed when a Throwable is thrown by a script.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkDeclaredArguments, executeMethod, executeMethod
protected S script
protected ScriptWrapper<S> wrapper
protected java.lang.reflect.Method m
public AbstractMethodProxy(ScriptWrapper<S> wrapper)
public ScriptWrapper<S> getScriptWrapper()
ScriptMethodProxy
getScriptWrapper
in interface ScriptMethodProxy<S,R>
protected void processException(java.lang.Throwable e) throws ScriptRuntimeException
e
- the ThrowableScriptRuntimeException
protected java.lang.Object[] convertRuntimeArguments(java.lang.Object... args)
args
- the arguments typesprotected boolean checkRuntimeArguments(boolean noExceptionsThrown, java.lang.Object... args)
noExceptionsThrown
- true if the method must return a boolean, but no exception should be rethrown,
false if an IllegalScriptArgumentException
if the arguments are incorrectargs
- the arguments typespublic boolean checkDeclaredArguments(java.lang.String methodName, java.lang.Class<?>... args)
checkDeclaredArguments
in interface ScriptMethodProxy<S,R>
methodName
- the method nameargs
- the arguments typesCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence