Package net.shibboleth.shared.primitive
Class AnnotationsSupport
java.lang.Object
net.shibboleth.shared.primitive.AnnotationsSupport
Static methods to work with annotations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCall theOnTeardownmethods.static voidcallOnTeardownAnnotations(Object obj, String id, org.slf4j.Logger log) Call theOnTeardownmethods.private static StringgetNameFor(Object obj, String suppliedName) Helper method to find a log-friendly name for an object.static booleanMostly for testing - does this object carry aOnTeardownannotated method?
-
Constructor Details
-
AnnotationsSupport
public AnnotationsSupport()
-
-
Method Details
-
callOnTeardownAnnotations
public static void callOnTeardownAnnotations(@Nullable Object obj, @Nullable String id, @Nullable org.slf4j.Logger log) Call theOnTeardownmethods.- Parameters:
obj- The object to introspectid- The id of the objectlog- the logger to use
-
getNameFor
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 itsuppliedName- the name, if we know it already- Returns:
- the best name we could
-
callOnTeardownAnnotations
Call theOnTeardownmethods.- Parameters:
obj- The object to introspect
-
hasOnTeardownAnnotation
Mostly for testing - does this object carry aOnTeardownannotated method?- Parameters:
obj- The object to introspect- Returns:
- whether it is tear-downable.
-