Package org.glassfish.config.support
Annotation Type Singleton
-
@Retention(RUNTIME) @Target(TYPE) public @interface Singleton
Annotation that qualifies a configuration element that can only exist as a singleton in the configuration tree. When configuration elements are added to their parents through a subclassing pattern, it can be difficult for the system to determine if this element can exist as a singleton or a collection. For instance, when the parent contains :@Element("*") ListA subclass of Extension can have a single or multiple instances stored in the extensions list. Adding this annotation will qualify that only one instance of the annotated configuration can be found in that collection. Note that the collection can contain other instances of other subclasses of Extension.getExtensions(); - Author:
- Jerome Dochez