Package org.eclipse.jetty.annotations

Examples of org.eclipse.jetty.annotations.AnnotationParser


  @Before
  public void setUp() throws Exception
  {
    _context = new SipAppContext();
    _parser = new AnnotationParser();
    _handler = new SipApplicationKeyAnnotationHandler(_context);
        _parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipApplicationKey",
            _handler);
  }
View Full Code Here


  @Before
  public void setUp() throws Exception
  {
    _sac = new SipAppContext();
    _parser = new AnnotationParser();
        _parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipServlet",
            new SipServletAnnotationHandler(_sac));
  }
View Full Code Here

    @Override
    public void configure(WebAppContext context) throws Exception
    {
      context.addDecorator(new AnnotationDecorator(context));
      
        AnnotationParser parser = new AnnotationParser();

        SipAppContext sac = (SipAppContext) context;
        if (sac.getSpecVersion() == SipAppContext.VERSION_10)
          return;
       
        if (Log.isDebugEnabled())
          Log.debug("parsing annotations");
       
        SipApplicationAnnotationHandler sipApplicationAnnotationHandler = new SipApplicationAnnotationHandler(sac);
        parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipApplication", sipApplicationAnnotationHandler);
        parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipApplicationKey", new SipApplicationKeyAnnotationHandler(sac));
        parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipListener", new SipListenerAnnotationHandler(sac));
        parser.registerAnnotationHandler("javax.servlet.sip.annotation.SipServlet", new SipServletAnnotationHandler(sac));
               

        clearAnnotationList(parser.getAnnotationHandlers());
        parseContainerPath(context, parser);
        parseWebInfLib (context, parser);
        parseWebInfClasses(context, parser);
       
        //gather together all annotations discovered
        List<DiscoveredAnnotation> annotations = new ArrayList<DiscoveredAnnotation>();
        gatherAnnotations(annotations, parser.getAnnotationHandlers());
        ((SipAppContext) context).getSipMetaData().addDiscoveredAnnotations (annotations);
       
     }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.annotations.AnnotationParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.