Class AnnotationIntrospector


  • public class AnnotationIntrospector
    extends java.lang.Object
    AnnotationIntrospector Introspects a class to find various types of annotations as defined by the servlet specification.
    • Constructor Detail

      • AnnotationIntrospector

        public AnnotationIntrospector​(org.eclipse.jetty.webapp.WebAppContext context)
    • Method Detail

      • 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:
        1. the object was created by the javax.servlet.ServletContext.createServlet/Filter/Listener method
        2. 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
        We also support evaluations of these types of annotations for objects that were created directly by the jetty api.
        Parameters:
        o - the object to check for its ability to be introspected for annotations
        metaInfo - 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)