Package org.zkoss.xel.zel
Class ClassReflect
java.lang.Object
org.zkoss.xel.zel.ClassReflect
- All Implemented Interfaces:
org.zkoss.zel.impl.util.ClassReflect
The implementation for using ZEL.
Notice that it is instantiated in zel.jar.
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCloseMethod(Class<?> cls, String name, Class<?>[] argTypes) Gets one of the close methods -- a close method is a method with the same name and the compatible argument type.getContextClassLoader(Class<?> reference) Returns the context ClassLoader for the reference class.newInstance(Class<?> cls, Object[] args) Instantiates a new instance of the specified class with the specified argument.
-
Constructor Details
-
ClassReflect
public ClassReflect()
-
-
Method Details
-
getCloseMethod
public Method getCloseMethod(Class<?> cls, String name, Class<?>[] argTypes) throws NoSuchMethodException Gets one of the close methods -- a close method is a method with the same name and the compatible argument type.- Specified by:
getCloseMethodin interfaceorg.zkoss.zel.impl.util.ClassReflect- Throws:
NoSuchMethodException
-
newInstance
public Object newInstance(Class<?> cls, Object[] args) throws NoSuchMethodException, InstantiationException, InvocationTargetException, IllegalAccessException Instantiates a new instance of the specified class with the specified argument.- Specified by:
newInstancein interfaceorg.zkoss.zel.impl.util.ClassReflect- Throws:
NoSuchMethodExceptionInstantiationExceptionInvocationTargetExceptionIllegalAccessException
-
getContextClassLoader
Returns the context ClassLoader for the reference class.- Specified by:
getContextClassLoaderin interfaceorg.zkoss.zel.impl.util.ClassReflect- Parameters:
reference- the reference class where it is invoked from.- Since:
- 8.0.2
-