When this annotation is placed on an abstract class the methods of
the class that are abstract will be generated into a subclass by
the hk2-metadata-generator along with an empty
Service annotation
Any Named or ContractsProvided
annotation on the class marked with this annotation will also be copied to the
implementation. No other qualifier or annotation will be copied to the concrete
implementation. However, the Rank annotation
on the stub class will be honored.
The methods generated into the subclass can either return null and fixed
values (for scalars) or can throw exceptions, depending on the
Stub.Type value of this annotation
Using this annotation is useful for testing, though it will work both with test code and non-test code
- Author:
- jwells
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements
-
Element Details
-
value
Stub.Type valueThis value determines what the generated methods doIf set to
Stub.Type.VALUESthen the methods will return nulls or fixed values for scalars.If set to
Stub.Type.EXCEPTIONSthen the methods will throw UnsupportedOperationException- Returns:
- The behavior of the generated methods
- Default:
- VALUES
-