Annotation Type 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 on each invocation
    SINGLE_INSTANCE mode creates a new instance once and then keeps using the same over and over