net.sf.cglib.core

## Class ReflectUtils

- java.lang.Object
- - net.sf.cglib.core.ReflectUtils

-     public class ReflectUtils
      extends java.lang.Object

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

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List` | `addAllInterfaces(java.lang.Class type, java.util.List list)`
    `static java.util.List` | `addAllMethods(java.lang.Class type, java.util.List list)`
    `static java.lang.Class` | `defineClass(java.lang.String className, byte[] b, java.lang.ClassLoader loader)`
    `static java.lang.reflect.Constructor` | `findConstructor(java.lang.String desc)`
    `static java.lang.reflect.Constructor` | `findConstructor(java.lang.String desc, java.lang.ClassLoader loader)`
    `static java.lang.reflect.Method` | `findDeclaredMethod(java.lang.Class type, java.lang.String methodName, java.lang.Class[] parameterTypes)`
    `static java.lang.reflect.Method` | `findInterfaceMethod(java.lang.Class iface)`
    `static java.lang.reflect.Method` | `findMethod(java.lang.String desc)`
    `static java.lang.reflect.Method` | `findMethod(java.lang.String desc, java.lang.ClassLoader loader)`
    `static java.lang.reflect.Method[]` | `findMethods(java.lang.String[] namesAndDescriptors, java.lang.reflect.Method[] methods)`
    `static java.lang.reflect.Method` | `findNewInstance(java.lang.Class iface)`
    `static int` | `findPackageProtected(java.lang.Class[] classes)`
    `static java.beans.PropertyDescriptor[]` | `getBeanGetters(java.lang.Class type)`
    `static java.beans.PropertyDescriptor[]` | `getBeanProperties(java.lang.Class type)`
    `static java.beans.PropertyDescriptor[]` | `getBeanSetters(java.lang.Class type)`
    `static java.lang.Class[]` | `getClasses(java.lang.Object[] objects)`
    `static ClassInfo` | `getClassInfo(java.lang.Class clazz)`
    `static java.lang.reflect.Constructor` | `getConstructor(java.lang.Class type, java.lang.Class[] parameterTypes)`
    `static java.lang.reflect.Type[]` | `getExceptionTypes(java.lang.reflect.Member member)`
    `static MethodInfo` | `getMethodInfo(java.lang.reflect.Member member)`
    `static MethodInfo` | `getMethodInfo(java.lang.reflect.Member member, int modifiers)`
    `static java.lang.String[]` | `getNames(java.lang.Class[] classes)`
    `static java.lang.reflect.Method[]` | `getPropertyMethods(java.beans.PropertyDescriptor[] properties, boolean read, boolean write)`
    `static Signature` | `getSignature(java.lang.reflect.Member member)`
    `static java.lang.Object` | `newInstance(java.lang.Class type)`
    `static java.lang.Object` | `newInstance(java.lang.Class type, java.lang.Class[] parameterTypes, java.lang.Object[] args)`
    `static java.lang.Object` | `newInstance(java.lang.reflect.Constructor cstruct, java.lang.Object[] args)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getExceptionTypes

          public static java.lang.reflect.Type[] getExceptionTypes(java.lang.reflect.Member member)

    - #### getSignature

          public static Signature getSignature(java.lang.reflect.Member member)

    - #### findConstructor

          public static java.lang.reflect.Constructor findConstructor(java.lang.String desc)

    - #### findConstructor

          public static java.lang.reflect.Constructor findConstructor(java.lang.String desc,
                                                      java.lang.ClassLoader loader)

    - #### findMethod

          public static java.lang.reflect.Method findMethod(java.lang.String desc)

    - #### findMethod

          public static java.lang.reflect.Method findMethod(java.lang.String desc,
                                            java.lang.ClassLoader loader)

    - #### newInstance

          public static java.lang.Object newInstance(java.lang.Class type)

    - #### newInstance

          public static java.lang.Object newInstance(java.lang.Class type,
                                     java.lang.Class[] parameterTypes,
                                     java.lang.Object[] args)

    - #### newInstance

          public static java.lang.Object newInstance(java.lang.reflect.Constructor cstruct,
                                     java.lang.Object[] args)

    - #### getConstructor

          public static java.lang.reflect.Constructor getConstructor(java.lang.Class type,
                                                     java.lang.Class[] parameterTypes)

    - #### getNames

          public static java.lang.String[] getNames(java.lang.Class[] classes)

    - #### getClasses

          public static java.lang.Class[] getClasses(java.lang.Object[] objects)

    - #### findNewInstance

          public static java.lang.reflect.Method findNewInstance(java.lang.Class iface)

    - #### getPropertyMethods

          public static java.lang.reflect.Method[] getPropertyMethods(java.beans.PropertyDescriptor[] properties,
                                                      boolean read,
                                                      boolean write)

    - #### getBeanProperties

          public static java.beans.PropertyDescriptor[] getBeanProperties(java.lang.Class type)

    - #### getBeanGetters

          public static java.beans.PropertyDescriptor[] getBeanGetters(java.lang.Class type)

    - #### getBeanSetters

          public static java.beans.PropertyDescriptor[] getBeanSetters(java.lang.Class type)

    - #### findDeclaredMethod

          public static java.lang.reflect.Method findDeclaredMethod(java.lang.Class type,
                                                    java.lang.String methodName,
                                                    java.lang.Class[] parameterTypes)
                                                             throws java.lang.NoSuchMethodException

      Throws:
        `java.lang.NoSuchMethodException`

    - #### addAllMethods

          public static java.util.List addAllMethods(java.lang.Class type,
                                     java.util.List list)

    - #### addAllInterfaces

          public static java.util.List addAllInterfaces(java.lang.Class type,
                                        java.util.List list)

    - #### findInterfaceMethod

          public static java.lang.reflect.Method findInterfaceMethod(java.lang.Class iface)

    - #### defineClass

          public static java.lang.Class defineClass(java.lang.String className,
                                    byte[] b,
                                    java.lang.ClassLoader loader)
                                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### findPackageProtected

          public static int findPackageProtected(java.lang.Class[] classes)

    - #### getMethodInfo

          public static MethodInfo getMethodInfo(java.lang.reflect.Member member,
                                 int modifiers)

    - #### getMethodInfo

          public static MethodInfo getMethodInfo(java.lang.reflect.Member member)

    - #### getClassInfo

          public static ClassInfo getClassInfo(java.lang.Class clazz)

    - #### findMethods

          public static java.lang.reflect.Method[] findMethods(java.lang.String[] namesAndDescriptors,
                                               java.lang.reflect.Method[] methods)

Copyright (c) 2001 - Apache Software Foundation