T - public class ProxyMethodGetter<T> extends Object implements MethodGetter<T>
MethodGetter.HelperUP_LOW_GAP| 构造器和说明 |
|---|
ProxyMethodGetter(Class<T> clz) |
| 限定符和类型 | 方法和说明 |
|---|---|
Method |
get(java.util.function.Function<T,?> invoke) |
Method |
get(Object invoke)
Get Method by an invocation result
|
T |
getMockObject()
Get the mocked object.
|
String |
getName(Object o)
Get Method name by an invocation result
|
Class<?> |
getType(Object o)
Get Method type by an invocation result
|
String |
nameOf(Object o)
More readable version of
getName(Object) |
Class<?> |
typeOf(Object o)
More readable version of
getType(Object) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnameOf, supportFieldInvoke, typeOfpublic ProxyMethodGetter(Class<T> clz) throws IllegalStateException
clz - IllegalStateException - If construct the mock object failed.public T getMockObject()
FieldGetterImpl fgi = new FieldGetterImpl(SomeClass.class);
fgi.getName(o -> o.prop);
// is same as
SomeClass sc = fgi.getMockObject();
fgi.getName(sc.prop);
public Method get(java.util.function.Function<T,?> invoke)
get 在接口中 InvokeGetter<T,Method>public Method get(Object invoke)
invoke - a invocation result of the mock objectgetMockObject()public String getName(Object o)
o - an invocation result of the mock objectgetMockObject()public Class<?> getType(Object o)
o - an invocation result of the mock objectgetMockObject()public String nameOf(Object o)
getName(Object)o - an invocation result of the mock objectgetMockObject()public Class<?> typeOf(Object o)
getType(Object)o - an invocation result of the mock objectgetMockObject()Copyright © 2017. All rights reserved.