org.eclipse.jetty.annotations

## Class AnnotationConfiguration

- java.lang.Object
- - org.eclipse.jetty.webapp.AbstractConfiguration
  - - org.eclipse.jetty.annotations.AnnotationConfiguration

- All Implemented Interfaces:
    Configuration

      public class AnnotationConfiguration
      extends AbstractConfiguration

  Configuration for Annotations

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ClassInheritanceHandler` | `_classInheritanceHandler`
    `protected List<ContainerInitializerAnnotationHandler>` | `_containerInitializerAnnotationHandlers`
    `protected List<AnnotationParser.DiscoverableAnnotationHandler>` | `_discoverableAnnotationHandlers`
    `static String` | `CLASS_INHERITANCE_MAP`
    `static String` | `CONTAINER_INITIALIZERS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnnotationConfiguration()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cloneConfigure(WebAppContext template, WebAppContext context)` Clone configuration instance.
    `void` | `configure(WebAppContext context)` Configure WebApp.
    `protected AnnotationParser` | `createAnnotationParser()`
    `void` | `createServletContainerInitializerAnnotationHandlers(WebAppContext context, List<javax.servlet.ServletContainerInitializer> scis)`
    `FragmentDescriptor` | `getFragmentFromJar(Resource jar, List<FragmentDescriptor> frags)` Get the web-fragment.xml from a jar
    `List<javax.servlet.ServletContainerInitializer>` | `getNonExcludedInitializers(WebAppContext context)`
    `boolean` | `isFromExcludedJar(WebAppContext context, javax.servlet.ServletContainerInitializer service)` Check to see if the ServletContainerIntializer loaded via the ServiceLoader came from a jar that is excluded by the fragment ordering.
    `boolean` | `isMetaDataComplete(WebDescriptor d)`
    `void` | `parseContainerPath(WebAppContext context, AnnotationParser parser)` Scan jars on container path.
    `void` | `parseWebInfClasses(WebAppContext context, AnnotationParser parser)` Scan classes in WEB-INF/classes
    `void` | `parseWebInfLib(WebAppContext context, AnnotationParser parser)` Scan jars in WEB-INF/lib
    `void` | `postConfigure(WebAppContext context)` Clear down after configuration.
    `void` | `preConfigure(WebAppContext context)` Set up for configuration.

    - ### Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration

      `deconfigure, destroy`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CLASS_INHERITANCE_MAP

          public static final String CLASS_INHERITANCE_MAP

      See Also:
        Constant Field Values

    - #### CONTAINER_INITIALIZERS

          public static final String CONTAINER_INITIALIZERS

      See Also:
        Constant Field Values

    - #### _discoverableAnnotationHandlers

          protected List<AnnotationParser.DiscoverableAnnotationHandler> _discoverableAnnotationHandlers

    - #### _classInheritanceHandler

          protected ClassInheritanceHandler _classInheritanceHandler

    - #### _containerInitializerAnnotationHandlers

          protected List<ContainerInitializerAnnotationHandler> _containerInitializerAnnotationHandlers

  - ### Constructor Detail

    - #### AnnotationConfiguration

          public AnnotationConfiguration()

  - ### Method Detail

    - #### preConfigure

          public void preConfigure(WebAppContext context)
                            throws Exception

      Description copied from interface: `Configuration`
      Set up for configuration.

      Typically this step discovers configuration resources

      Specified by:
        `preConfigure` in interface `Configuration`
      Overrides:
        `preConfigure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`

    - #### configure

          public void configure(WebAppContext context)
                         throws Exception

      Description copied from interface: `Configuration`
      Configure WebApp.

      Typically this step applies the discovered configuration resources to either the `WebAppContext` or the associated `MetaData`.

      Specified by:
        `configure` in interface `Configuration`
      Overrides:
        `configure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`
      See Also:
        `AbstractConfiguration.configure(org.eclipse.jetty.webapp.WebAppContext)`

    - #### postConfigure

          public void postConfigure(WebAppContext context)
                             throws Exception

      Description copied from interface: `Configuration`
      Clear down after configuration.
      Specified by:
        `postConfigure` in interface `Configuration`
      Overrides:
        `postConfigure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`
      See Also:
        `AbstractConfiguration.postConfigure(org.eclipse.jetty.webapp.WebAppContext)`

    - #### createAnnotationParser

          protected AnnotationParser createAnnotationParser()

      Returns:
        a new AnnotationParser. This method can be overridden to use a different impleemntation of the AnnotationParser. Note that this is considered internal API.

    - #### cloneConfigure

          public void cloneConfigure(WebAppContext template,
                            WebAppContext context)
                              throws Exception

      Description copied from interface: `Configuration`
      Clone configuration instance.

      Configure an instance of a WebAppContext, based on a template WebAppContext that has previously been configured by this Configuration.

      Specified by:
        `cloneConfigure` in interface `Configuration`
      Overrides:
        `cloneConfigure` in class `AbstractConfiguration`
      Parameters:
        `template` - The template context
        `context` - The context to configure
      Throws:
        `Exception`
      See Also:
        `AbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)`

    - #### createServletContainerInitializerAnnotationHandlers

          public void createServletContainerInitializerAnnotationHandlers(WebAppContext context,
                                                                 List<javax.servlet.ServletContainerInitializer> scis)
                                                                   throws Exception

      Parameters:
        `context` -
        `scis` -
      Throws:
        `Exception`

    - #### isFromExcludedJar

          public boolean isFromExcludedJar(WebAppContext context,
                                  javax.servlet.ServletContainerInitializer service)
                                    throws Exception

      Check to see if the ServletContainerIntializer loaded via the ServiceLoader came from a jar that is excluded by the fragment ordering. See ServletSpec 3.0 p.85.
      Parameters:
        `orderedJars` -
        `service` -
      Returns:
      Throws:
        `Exception`

    - #### getNonExcludedInitializers

          public List<javax.servlet.ServletContainerInitializer> getNonExcludedInitializers(WebAppContext context)
                                                                                     throws Exception

      Parameters:
        `context` -
      Returns:
      Throws:
        `Exception`

    - #### parseContainerPath

          public void parseContainerPath(WebAppContext context,
                                AnnotationParser parser)
                                  throws Exception

      Scan jars on container path.
      Parameters:
        `context` -
        `parser` -
      Throws:
        `Exception`

    - #### parseWebInfLib

          public void parseWebInfLib(WebAppContext context,
                            AnnotationParser parser)
                              throws Exception

      Scan jars in WEB-INF/lib
      Parameters:
        `context` -
        `parser` -
      Throws:
        `Exception`

    - #### parseWebInfClasses

          public void parseWebInfClasses(WebAppContext context,
                                AnnotationParser parser)
                                  throws Exception

      Scan classes in WEB-INF/classes
      Parameters:
        `context` -
        `parser` -
      Throws:
        `Exception`

    - #### getFragmentFromJar

          public FragmentDescriptor getFragmentFromJar(Resource jar,
                                              List<FragmentDescriptor> frags)
                                                throws Exception

      Get the web-fragment.xml from a jar
      Parameters:
        `jar` -
        `frags` -
      Returns:
      Throws:
        `Exception`

    - #### isMetaDataComplete

          public boolean isMetaDataComplete(WebDescriptor d)

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.