Class ProxyFactory
java.lang.Object
io.appium.java_client.pagefactory.utils.ProxyFactory
Original class is a super class of a
proxy object here.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetEnhancedProxy(Class<T> requiredClazz, MethodCallListener listener) Creates a proxy instance for the given class with an empty constructor.static <T> TgetEnhancedProxy(Class<T> cls, Class<?>[] params, Object[] values, MethodCallListener listener) Creates a proxy instance for the given class.
-
Method Details
-
getEnhancedProxy
Creates a proxy instance for the given class with an empty constructor.- Type Parameters:
T- The proxy object class.- Parameters:
requiredClazz- is aClasswhose instance should be createdlistener- is the instance of a method listener class- Returns:
- a proxied instance of the desired class
-
getEnhancedProxy
public static <T> T getEnhancedProxy(Class<T> cls, Class<?>[] params, Object[] values, MethodCallListener listener) Creates a proxy instance for the given class.- Type Parameters:
T- The proxy object class.- Parameters:
cls- is aClasswhose instance should be createdparams- is an array of @link java.lang.Class}. It should be convenient to parameter types of some declared constructor which belongs to desired class.values- is an array of @link java.lang.Object}. It should be convenient to parameter types of some declared constructor which belongs to desired class.listener- is the instance of a method listener class- Returns:
- a proxied instance of the desired class
-