Package org.eclipse.jetty.annotations
Class AnnotationIntrospector
- java.lang.Object
-
- org.eclipse.jetty.annotations.AnnotationIntrospector
-
public class AnnotationIntrospector extends java.lang.Object
AnnotationIntrospector Introspects a class to find various types of annotations as defined by the servlet specification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnnotationIntrospector.AbstractIntrospectableAnnotationHandler
AbstractIntrospectableAnnotationHandler Base class for handlers that introspect a class to find a particular annotation.static interface
AnnotationIntrospector.IntrospectableAnnotationHandler
IntrospectableAnnotationHandler Interface for all handlers that wish to introspect a class to find a particular annotation
-
Constructor Summary
Constructors Constructor Description AnnotationIntrospector(org.eclipse.jetty.webapp.WebAppContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
introspect(java.lang.Object o, java.lang.Object metaInfo)
boolean
isIntrospectable(java.lang.Object o, java.lang.Object metaInfo)
Test if an object should be introspected for some specific types of annotations like PostConstruct/PreDestroy/MultiPart etc etc.void
registerHandler(AnnotationIntrospector.IntrospectableAnnotationHandler handler)
-
-
-
Method Detail
-
registerHandler
public void registerHandler(AnnotationIntrospector.IntrospectableAnnotationHandler handler)
-
isIntrospectable
public boolean isIntrospectable(java.lang.Object o, java.lang.Object metaInfo)
Test if an object should be introspected for some specific types of annotations like PostConstruct/PreDestroy/MultiPart etc etc. According to servlet 4.0, these types of annotations should only be evaluated iff any of the following are true:- the object was created by the javax.servlet.ServletContext.createServlet/Filter/Listener method
- the object comes either from a discovered annotation (WebServlet/Filter/Listener) or a declaration in a descriptor AND web.xml is NOT metadata-complete AND any web-fragment.xml associated with the location of the class is NOT metadata-complete
- Parameters:
o
- the object to check for its ability to be introspected for annotationsmetaInfo
- meta information about the object to be introspected- Returns:
- true if it can be introspected according to servlet 4.0 rules
-
introspect
public void introspect(java.lang.Object o, java.lang.Object metaInfo)
-
-