Class ReflectionUtils

java.lang.Object
io.fluxcapacitor.common.reflection.ReflectionUtils

public class ReflectionUtils
extends Object
  • Constructor Details

    • ReflectionUtils

      public ReflectionUtils()
  • Method Details

    • getAllMethods

      public static List<Method> getAllMethods​(Class<?> type)
    • getAnnotatedPropertyValue

      public static Optional<?> getAnnotatedPropertyValue​(Object target, Class<? extends Annotation> annotation)
    • getAnnotatedProperties

      public static List<? extends AccessibleObject> getAnnotatedProperties​(Object target, Class<? extends Annotation> annotation)
    • getAnnotatedMethods

      public static List<Method> getAnnotatedMethods​(Object target, Class<? extends Annotation> annotation)
    • getAnnotatedFields

      public static List<Field> getAnnotatedFields​(Object target, Class<? extends Annotation> annotation)
    • getTypeAnnotation

      public static <A extends Annotation> A getTypeAnnotation​(Class<?> type, Class<A> annotationType)
    • readProperty

      public static <T> Optional<T> readProperty​(String propertyPath, Object target)
    • hasProperty

      public static boolean hasProperty​(String propertyPath, Object target)
    • writeProperty

      public static void writeProperty​(String propertyPath, Object target, Object value)
    • getCollectionElementType

      public static Class<?> getCollectionElementType​(Type parameterizedType)
    • declaresField

      public static boolean declaresField​(Class<?> target, String fieldName)
    • setField

      public static void setField​(Field field, Object target, Object value)
    • setField

      public static void setField​(String fieldName, Object target, Object value)
    • ensureAccessible

      public static <T extends AccessibleObject> T ensureAccessible​(T member)
    • getAnnotations

      public static Collection<? extends Annotation> getAnnotations​(Class<?> type)
    • classForName

      public static Class<?> classForName​(String type)
    • getAnnotation

      public static <A extends Annotation> A getAnnotation​(Executable m, Class<A> a)
    • classExists

      public static boolean classExists​(String className)