Interface ServletConfigurator.ConfigItem<I>

Type Parameters:
I - The type of value held by the configuration item.
Enclosing interface:
ServletConfigurator

public static interface ServletConfigurator.ConfigItem<I>
Generic configuration item. Encapsulates a value, a source, and provides a specific value comparison implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    compareValue(I otherValue)
    Compare the value of this configuration item with a specified value.
    Tell the URI of the library of the configuration item.
    Tell the source of the configuration item (web, web fragment, or annotation).
    Answer the value of the configuration item.
    <T> T
    getValue(Class<T> cls)
    Answer a value of a specific type.
  • Method Details

    • getValue

      I getValue()
      Answer the value of the configuration item. Null may be returned.
      Returns:
      The value of the configuration item.
    • getValue

      <T> T getValue(Class<T> cls)
      Answer a value of a specific type.
      Parameters:
      cls - The type of the value which is to be obtained.
      Returns:
      A value of the specified type.
    • compareValue

      boolean compareValue(I otherValue)
      Compare the value of this configuration item with a specified value. The specified value may be null.
      Parameters:
      otherValue - The other value to compare against.
      Returns:
      True if the values are equal. False if the values are unequal.
    • getSource

      Tell the source of the configuration item (web, web fragment, or annotation). When the source of the item is a fragment, the library URI is set to the URI of the library. When the source of the item is web.xml, the library URI is fixed to "WEB-INF/web.xml". See getLibraryURI().
      Returns:
      The source of the configuration item.
    • getLibraryURI

      String getLibraryURI()
      Tell the URI of the library of the configuration item. When the source of the item is web.xml, answer the fixed value "WEB-INF/web.xml".
      Returns:
      The URI of the library of the configuration.