public class ProxyMethodGetter<T> extends Object implements MethodPropGetter<T>
| 构造器和说明 |
|---|
ProxyMethodGetter(Class<T> clz) |
| 限定符和类型 | 方法和说明 |
|---|---|
Method |
getMethod(Consumer<T> invoke)
Get method from invocation.
|
Method |
getMethod(Object invoke)
Get Method by an invocation result
|
T |
getMockObject()
Get the mocked object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropName, getPropName, getPropType, getPropTypegetMethodName, getMethodTypesupportFieldInvokepublic 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 getMethod(Consumer<T> invoke)
MethodGettergetMethod 在接口中 MethodGetter<T>public Method getMethod(Object invoke)
invoke - a invocation result of the mock objectgetMockObject()Copyright © 2018. All rights reserved.