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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancompareValue(I otherValue)Compare the value of this configuration item with a specified value.java.lang.StringgetLibraryURI()Tell the URI of the library of the configuration item.ServletConfigurator.ConfigSourcegetSource()Tell the source of the configuration item (web, web fragment, or annotation).IgetValue()Answer the value of the configuration item.<T> TgetValue(java.lang.Class<T> cls)Answer a value of a specific type.
-
-
-
Method Detail
-
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(java.lang.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
ServletConfigurator.ConfigSource 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". SeegetLibraryURI().- Returns:
- The source of the configuration item.
-
getLibraryURI
java.lang.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.
-
-