Class AnnotationsSupport

java.lang.Object
net.shibboleth.shared.primitive.AnnotationsSupport

public final class AnnotationsSupport extends Object
Static methods to work with annotations.
  • Constructor Details

    • AnnotationsSupport

      public AnnotationsSupport()
  • Method Details

    • callOnTeardownAnnotations

      public static void callOnTeardownAnnotations(@Nullable Object obj, @Nullable String id, @Nullable org.slf4j.Logger log)
      Call the OnTeardown methods.
      Parameters:
      obj - The object to introspect
      id - The id of the object
      log - the logger to use
    • getNameFor

      @Nonnull private static String getNameFor(@Nonnull Object obj, @Nullable String suppliedName)
      Helper method to find a log-friendly name for an object.

      Return the supplied name if non null, otherwise interrogate for its identity (if it has one), otherwise generate something.

      Parameters:
      obj - The object we are interested it
      suppliedName - the name, if we know it already
      Returns:
      the best name we could
    • callOnTeardownAnnotations

      public static void callOnTeardownAnnotations(@Nullable Object obj)
      Call the OnTeardown methods.
      Parameters:
      obj - The object to introspect
    • hasOnTeardownAnnotation

      public static boolean hasOnTeardownAnnotation(@Nullable Object obj)
      Mostly for testing - does this object carry a OnTeardown annotated method?
      Parameters:
      obj - The object to introspect
      Returns:
      whether it is tear-downable.