Class ReflectedType<T>

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

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

    • ReflectedType

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

    • reflect

      public static <T> ReflectedType<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)
    • streamSuppliersWith

      public Stream<Method> streamSuppliersWith(Class<? extends Annotation> annotationClass)
    • streamMethodsWith

      public Stream<Method> streamMethodsWith(Class<? extends Annotation> annotationType)