Package org.zkoss.xel.zel
Class ClassReflect
- java.lang.Object
-
- org.zkoss.xel.zel.ClassReflect
-
- All Implemented Interfaces:
org.zkoss.zel.impl.util.ClassReflect
public class ClassReflect extends java.lang.Object implements org.zkoss.zel.impl.util.ClassReflectThe implementation for using ZEL. Notice that it is instantiated in zel.jar.- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description ClassReflect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.MethodgetCloseMethod(java.lang.Class<?> cls, java.lang.String name, java.lang.Class<?>[] argTypes)Gets one of the close methods -- a close method is a method with the same name and the compatible argument type.java.lang.ClassLoadergetContextClassLoader(java.lang.Class<?> reference)Returns the context ClassLoader for the reference class.java.lang.ObjectnewInstance(java.lang.Class<?> cls, java.lang.Object[] args)Instantiates a new instance of the specified class with the specified argument.
-
-
-
Method Detail
-
getCloseMethod
public java.lang.reflect.Method getCloseMethod(java.lang.Class<?> cls, java.lang.String name, java.lang.Class<?>[] argTypes) throws java.lang.NoSuchMethodExceptionGets 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:
java.lang.NoSuchMethodException
-
newInstance
public java.lang.Object newInstance(java.lang.Class<?> cls, java.lang.Object[] args) throws java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessExceptionInstantiates a new instance of the specified class with the specified argument.- Specified by:
newInstancein interfaceorg.zkoss.zel.impl.util.ClassReflect- Throws:
java.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessException
-
getContextClassLoader
public java.lang.ClassLoader getContextClassLoader(java.lang.Class<?> reference)
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
-
-