@Documented @Retention(value=SOURCE) @Target(value=TYPE) public @interface Stub
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
public abstract Stub.Type value
If set to Stub.Type.VALUES
then the methods will return
nulls or fixed values for scalars.
If set to Stub.Type.EXCEPTIONS
then the methods will
throw UnsupportedOperationException
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.