Klasse Reflections

java.lang.Object
org.jupnp.util.Reflections

public class Reflections extends Object
Autor:
Christian Bauer
  • Konstruktordetails

    • Reflections

      public Reflections()
  • Methodendetails

    • invoke

      public static Object invoke(Method method, Object target, Object... args) throws Exception
      Löst aus:
      Exception
    • get

      public static Object get(Field field, Object target) throws Exception
      Löst aus:
      Exception
    • getMethod

      public static Method getMethod(Class clazz, String name)
    • set

      public static void set(Field field, Object target, Object value) throws Exception
      Löst aus:
      Exception
    • getMethodPropertyName

      public static String getMethodPropertyName(String methodName)
    • getGetterMethod

      public static Method getGetterMethod(Class clazz, String name)
    • getMethods

      public static List<Method> getMethods(Class clazz, Class annotation)
    • getField

      public static Field getField(Class clazz, String name)
    • getFields

      public static List<Field> getFields(Class clazz, Class annotation)
    • getTypeArguments

      public static <T> List<Class<?>> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
      Get the actual type arguments a child class has used to extend a generic base class.
      Parameter:
      baseClass - the base class
      childClass - the child class
      Gibt zurück:
      a list of the raw classes for the actual type arguments.
    • getClass

      public static Class<?> getClass(Type type)
      Get the underlying class for a type, or null if the type is a variable type.
      Parameter:
      type - the type
      Gibt zurück:
      the underlying class
    • getAndWrap

      public static Object getAndWrap(Field field, Object target)
    • setAndWrap

      public static void setAndWrap(Field field, Object target, Object value)
    • invokeAndWrap

      public static Object invokeAndWrap(Method method, Object target, Object... args)
    • toString

      public static String toString(Member member)
    • classForName

      public static Class classForName(String name) throws ClassNotFoundException
      Löst aus:
      ClassNotFoundException
    • isClassAvailable

      public static boolean isClassAvailable(String name)
    • getCollectionElementType

      public static Class getCollectionElementType(Type collectionType)
    • getMapKeyType

      public static Class getMapKeyType(Type collectionType)
    • getSetterMethod

      public static Method getSetterMethod(Class clazz, String name)
    • getMethod

      public static Method getMethod(Annotation annotation, String name)
    • isInstanceOf

      public static boolean isInstanceOf(Class clazz, String name)
    • toClassNameString

      public static String toClassNameString(String sep, Object... objects)
    • unqualify

      public static String unqualify(String name)
    • unqualify

      public static String unqualify(String name, char sep)
    • decapitalize

      public static String decapitalize(String name)