Class ReflectingType<T>

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

public final class ReflectingType<T>
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    ReflectingType​(java.lang.Class<T> type)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.reflect.Method findMethod​(java.lang.String name)
    Returns the named method that does not have any parameter.
    java.lang.reflect.Method findMethod​(java.lang.String name, java.lang.Class<?>... parameters)  
    java.util.List<java.lang.reflect.Method> findMethods​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
    Returns all methods that have the given annotation.
    java.util.List<java.lang.reflect.Method> findMethods​(java.lang.String name)
    Returns all methods that have the given name.
    <A extends java.lang.annotation.Annotation>
    java.util.Optional<A>
    findOnType​(java.lang.Class<A> annotationType)  
    java.lang.Class<T> getType()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReflectingType

      public ReflectingType​(java.lang.Class<T> type)
  • Method Details

    • findMethod

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

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

      public java.util.List<java.lang.reflect.Method> findMethods​(java.lang.String name)
      Returns all methods that have the given name.
      Parameters:
      name -
      Returns:
    • findMethods

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

      public java.lang.Class<T> getType()
    • findOnType

      public <A extends java.lang.annotation.Annotation> java.util.Optional<A> findOnType​(java.lang.Class<A> annotationType)