Annotation Interface Instantiation


@Retention(RUNTIME) @Target(TYPE) public @interface Instantiation

Indicates how a dynamic class should be managed by the class that instantiate it The mode parameter by default is set to NEW_INSTANCE.

NEW_INSTANCE mode creates a new instance of the class for each invocation
SINGLE_INSTANCE mode creates a single instance that is reused for every request

For request handlers that hold no state the SINGLE_INSTANCE mode is recommended