Top Fields Constructors Methods
org.springframework.cglib.core

public Class ReflectUtils

extends Object
Class Inheritance
Annotations
@SuppressWarnings:rawtypes, unchecked
Imports
java.beans.BeanInfo, .IntrospectionException, .Introspector, .PropertyDescriptor, java.lang.invoke.MethodHandles, java.lang.reflect.Constructor, .InaccessibleObjectException, .InvocationTargetException, .Member, .Method, .Modifier, java.security.ProtectionDomain, java.util.ArrayList, .Arrays, .HashMap, .HashSet, .List, .Map, .Set, java.util.function.BiConsumer, .Consumer, org.springframework.asm.Type

Version
$Id: ReflectUtils.java,v 1.30 2009/01/11 19:47:49 herbyderby Exp $

Field Summary

Modifier and TypeField and Description
private static final String[]
private static final Method
private static final ClassLoader
private static BiConsumer<String, byte[]>
private static Consumer<Class<?>>
private static final List<Method>
private static final Map<K, V>
private static final ProtectionDomain
private static final Throwable
private static final Map<K, V>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static List<E>
addAllInterfaces(Class<T> type, List<E> list)

public static List<E>
addAllMethods(final Class<T> type, final List<E> list)

public static Class<T>
defineClass(String className, byte[] b, ClassLoader loader)

public static Class<T>
defineClass(String className, byte[] b, ClassLoader loader, ProtectionDomain protectionDomain)

public static Class<T>
defineClass(String className, byte[] b, ClassLoader loader, ProtectionDomain protectionDomain, Class<?> contextClass)

public static Constructor<T>
public static Constructor<T>
public static Method
findDeclaredMethod(final Class<T> type, final String methodName, final Class<T>[] parameterTypes)

public static Method
public static Method
public static Method
public static Method[]
findMethods(String[] namesAndDescriptors, Method[] methods)

public static Method
public static int
public static PropertyDescriptor[]
public static PropertyDescriptor[]
public static PropertyDescriptor[]
private static Class<T>
getClass(String className, ClassLoader loader)

private static Class<T>
getClass(String className, ClassLoader loader, String[] packages)

public static Class<T>[]
getClasses(Object[] objects)

public static ClassInfo
getClassInfo(final Class<T> clazz)

public static Constructor<T>
getConstructor(Class<T> type, Class<T>[] parameterTypes)

public static Type[]
public static MethodInfo
getMethodInfo(final Member member, final int modifiers)

public static MethodInfo
public static String[]
getNames(Class<T>[] classes)

private static PropertyDescriptor[]
getPropertiesHelper(Class<T> type, boolean read, boolean write)

public static Method[]
getPropertyMethods(PropertyDescriptor[] properties, boolean read, boolean write)

public static ProtectionDomain
getProtectionDomain(final Class<T> source)

public static Signature
public static Class<?>
loadClass(String className, ClassLoader classLoader)

public static Object
newInstance(Class<T> type)

public static Object
newInstance(Class<T> type, Class<T>[] parameterTypes, Object[] args)

public static Object
newInstance(final Constructor<T> cstruct, final Object[] args)

private static Class<T>[]
public static void
public static void
setLoadedClassHandler(Consumer<Class<?>> loadedClassHandler)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CGLIB_PACKAGESback to summary
private static final String[] CGLIB_PACKAGES
classLoaderDefineClassMethodback to summary
private static final Method classLoaderDefineClassMethod
defaultLoaderback to summary
private static final ClassLoader defaultLoader
generatedClassHandlerback to summary
private static BiConsumer<String, byte[]> generatedClassHandler
loadedClassHandlerback to summary
private static Consumer<Class<?>> loadedClassHandler
OBJECT_METHODSback to summary
private static final List<Method> OBJECT_METHODS
primitivesback to summary
private static final Map<K, V> primitives
PROTECTION_DOMAINback to summary
private static final ProtectionDomain PROTECTION_DOMAIN
THROWABLEback to summary
private static final Throwable THROWABLE
transformsback to summary
private static final Map<K, V> transforms

Constructor Detail

ReflectUtilsback to summary
private ReflectUtils()

Method Detail

addAllInterfacesback to summary
public static List<E> addAllInterfaces(Class<T> type, List<E> list)
addAllMethodsback to summary
public static List<E> addAllMethods(final Class<T> type, final List<E> list)
defineClassback to summary
public static Class<T> defineClass(String className, byte[] b, ClassLoader loader) throws Exception
defineClassback to summary
public static Class<T> defineClass(String className, byte[] b, ClassLoader loader, ProtectionDomain protectionDomain) throws Exception
defineClassback to summary
public static Class<T> defineClass(String className, byte[] b, ClassLoader loader, ProtectionDomain protectionDomain, Class<?> contextClass) throws Exception
Annotations
@SuppressWarnings:deprecation, serial
findConstructorback to summary
public static Constructor<T> findConstructor(String desc)
findConstructorback to summary
public static Constructor<T> findConstructor(String desc, ClassLoader loader)
findDeclaredMethodback to summary
public static Method findDeclaredMethod(final Class<T> type, final String methodName, final Class<T>[] parameterTypes) throws NoSuchMethodException
findInterfaceMethodback to summary
public static Method findInterfaceMethod(Class<T> iface)
findMethodback to summary
public static Method findMethod(String desc)
findMethodback to summary
public static Method findMethod(String desc, ClassLoader loader)
findMethodsback to summary
public static Method[] findMethods(String[] namesAndDescriptors, Method[] methods)
findNewInstanceback to summary
public static Method findNewInstance(Class<T> iface)
findPackageProtectedback to summary
public static int findPackageProtected(Class<T>[] classes)
getBeanGettersback to summary
public static PropertyDescriptor[] getBeanGetters(Class<T> type)
getBeanPropertiesback to summary
public static PropertyDescriptor[] getBeanProperties(Class<T> type)
getBeanSettersback to summary
public static PropertyDescriptor[] getBeanSetters(Class<T> type)
getClassback to summary
private static Class<T> getClass(String className, ClassLoader loader) throws ClassNotFoundException
getClassback to summary
private static Class<T> getClass(String className, ClassLoader loader, String[] packages) throws ClassNotFoundException
getClassesback to summary
public static Class<T>[] getClasses(Object[] objects)
getClassInfoback to summary
public static ClassInfo getClassInfo(final Class<T> clazz)
getConstructorback to summary
public static Constructor<T> getConstructor(Class<T> type, Class<T>[] parameterTypes)
getExceptionTypesback to summary
public static Type[] getExceptionTypes(Member member)
getMethodInfoback to summary
public static MethodInfo getMethodInfo(final Member member, final int modifiers)
getMethodInfoback to summary
public static MethodInfo getMethodInfo(Member member)
getNamesback to summary
public static String[] getNames(Class<T>[] classes)
getPropertiesHelperback to summary
private static PropertyDescriptor[] getPropertiesHelper(Class<T> type, boolean read, boolean write)
getPropertyMethodsback to summary
public static Method[] getPropertyMethods(PropertyDescriptor[] properties, boolean read, boolean write)
getProtectionDomainback to summary
public static ProtectionDomain getProtectionDomain(final Class<T> source)
getSignatureback to summary
public static Signature getSignature(Member member)
loadClassback to summary
public static Class<?> loadClass(String className, ClassLoader classLoader) throws ClassNotFoundException
newInstanceback to summary
public static Object newInstance(Class<T> type)
newInstanceback to summary
public static Object newInstance(Class<T> type, Class<T>[] parameterTypes, Object[] args)
newInstanceback to summary
public static Object newInstance(final Constructor<T> cstruct, final Object[] args)
Annotations
@SuppressWarnings:deprecation
parseTypesback to summary
private static Class<T>[] parseTypes(String desc, ClassLoader loader) throws ClassNotFoundException
setGeneratedClassHandlerback to summary
public static void setGeneratedClassHandler(BiConsumer<String, byte[]> handler)
setLoadedClassHandlerback to summary
public static void setLoadedClassHandler(Consumer<Class<?>> loadedClassHandler)