Class ReflectionsDatabase

java.lang.Object
com.arpnetworking.utility.ReflectionsDatabase
All Implemented Interfaces:
AnnotationDatabase, InterfaceDatabase

public final class ReflectionsDatabase extends Object implements InterfaceDatabase, AnnotationDatabase
Default implementation of InterfaceDatabase.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot com)
  • Method Details

    • newInstance

      public static ReflectionsDatabase newInstance()
      Create a new instance of InterfaceDatabase.
      Returns:
      New instance of InterfaceDatabase.
    • findClassesWithAnnotation

      public Set<Class<?>> findClassesWithAnnotation(Class<? extends Annotation> annotationClass)
      Description copied from interface: AnnotationDatabase
      Retrieve the Set of classes with the declared annotation.
      Specified by:
      findClassesWithAnnotation in interface AnnotationDatabase
      Parameters:
      annotationClass - The annotation class to search for.
      Returns:
      The Set of classes that are declared with the specified annotation.
    • findClassesWithInterface

      public <T> Set<Class<? extends T>> findClassesWithInterface(Class<T> interfaceClass)
      Description copied from interface: InterfaceDatabase
      Retrieve the Set of classes with the implemented interface.
      Specified by:
      findClassesWithInterface in interface InterfaceDatabase
      Type Parameters:
      T - The interface type.
      Parameters:
      interfaceClass - The interface class to search for.
      Returns:
      The Set of classes that are implementing the specified interface.
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object