Class ReflectingType<T>

java.lang.Object
me.ehp246.aufjms.core.reflection.ReflectingType<T>

public final class ReflectingType<T> extends Object
Since:
1.0
Author:
Lei Yang
  • Constructor Details

    • ReflectingType

      public ReflectingType(Class<T> type)
  • Method Details

    • reflect

      public static <T> ReflectingType<T> reflect(Class<T> type)
    • findMethod

      public Method findMethod(String name)
      Returns the named method that does not have any parameter. Returns null if not found.
      Parameters:
      name -
      Returns:
    • findMethod

      public Method findMethod(String name, Class<?>... parameters)
    • findMethods

      public List<Method> findMethods(String name)
      Returns all methods that have the given name ignoring the parameters.
      Parameters:
      name -
      Returns:
    • findMethods

      public List<Method> findMethods(Class<? extends Annotation> annotationClass)
      Returns all methods that have the given annotation.
      Parameters:
      annotationClass -
      Returns:
    • getType

      public Class<T> getType()
    • findOnType

      public <A extends Annotation> Optional<A> findOnType(Class<A> annotationType)