public class Evaluation<R> extends Object implements IProxyFactory.Callback
Modifier and Type | Field and Description |
---|---|
List<Object> |
stack
Each invoked method followed by its arguments.
|
Constructor and Description |
---|
Evaluation(Type type)
Evaluation of method invocations on the given type.
|
Modifier and Type | Method and Description |
---|---|
static <R> Evaluation<R> |
eval(R result)
Reverse operation of
proxy() , i.e. |
static <T> T |
of(Class<T> type)
Start evaluation from the give type.
|
Object |
on(Object obj,
Method method,
Object[] parameters)
Handle an invocation on a result proxy.
|
Object |
proxy()
Create a proxy for the current type.
|
public Evaluation(Type type)
type
- starting typepublic Object on(Object obj, Method method, Object[] parameters) throws Throwable
on
in interface IProxyFactory.Callback
Throwable
proxy()
public Object proxy()
If the result cannot be proxied, it is accessible via
lastNonProxyable
.
null
if invocation result cannot be proxiedpublic static <R> Evaluation<R> eval(R result)
proxy()
, i.e. get the evaluation from an
evaluation result.result
- invocation resultpublic static <T> T of(Class<T> type)
type
- starting typeCopyright © 2015. All rights reserved.