Class AnnotationIntrospector

java.lang.Object
org.eclipse.jetty.annotations.AnnotationIntrospector

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

    • AnnotationIntrospector

      public AnnotationIntrospector(WebAppContext context)
  • Method Details

    • registerHandler

      public void registerHandler(AnnotationIntrospector.IntrospectableAnnotationHandler handler)
    • isIntrospectable

      public boolean isIntrospectable(Object o, 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(Object o, Object metaInfo)