| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsleep.engine.ProxyInterface
public class ProxyInterface
This class is used to mock an instance of a class that implements a specified Java interface using a Sleep function.
| Field Summary | |
|---|---|
| protected  Function | func | 
| protected  ScriptInstance | script | 
| Constructor Summary | |
|---|---|
| ProxyInterface(Function _method,
               ScriptInstance _script) | |
| Method Summary | |
|---|---|
| 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 | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected ScriptInstance script
protected Function func
| Constructor Detail | 
|---|
public ProxyInterface(Function _method,
                      ScriptInstance _script)
| Method Detail | 
|---|
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.InvocationHandlerjava.lang.Throwable| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||