public class ProxyInterface
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
protected Function |
func |
protected ScriptInstance |
script |
Constructor and Description |
---|
ProxyInterface(Function _method,
ScriptInstance _script) |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
BuildInterface(java.lang.Class[] classes,
Block block,
ScriptInstance script)
Constructs a new instance of the specified class that uses the passed block to respond
to all method calls on this instance.
|
static java.lang.Object |
BuildInterface(java.lang.Class[] classes,
Function subroutine,
ScriptInstance script)
Constructs a new instance of the specified class that uses the passed Sleep function to respond
to all method calls on this instance.
|
static java.lang.Object |
BuildInterface(java.lang.Class className,
Block block,
ScriptInstance script)
Constructs a new instance of the specified class that uses the passed block to respond
to all method calls on this instance.
|
static java.lang.Object |
BuildInterface(java.lang.Class className,
Function subroutine,
ScriptInstance script)
Constructs a new instance of the specified class that uses the passed Sleep function to respond
to all method calls on this instance.
|
ScriptInstance |
getOwner()
Returns the script associated with this proxy interface.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
This function invokes the contained Sleep closure with the specified arguments
|
java.lang.String |
toString()
Returns a string description of this proxy interface
|
protected ScriptInstance script
protected Function func
public ProxyInterface(Function _method, ScriptInstance _script)
public ScriptInstance getOwner()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.Object BuildInterface(java.lang.Class className, Function subroutine, ScriptInstance script)
public static java.lang.Object BuildInterface(java.lang.Class[] classes, Function subroutine, ScriptInstance script)
public static java.lang.Object BuildInterface(java.lang.Class className, Block block, ScriptInstance script)
public static java.lang.Object BuildInterface(java.lang.Class[] classes, Block block, ScriptInstance script)
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable