Annotation Interface Substitute
TargetClass
as the value
element of that
annotation specifies the class containing the method to be substituted (the substitutee
class).
The method to be substituted is determined based on a name and a list of parameter types. The
name is specified by an optional TargetElement.name()
element of this annotation. If this
element is not specified, then the name of the substitution method is used. The parameter types
are those of the substitution method.
There must never be an explicit call to a non-static method annotated with Substitute
unless it is from another non-static method in the same class.
When used to annotate a class, it indicates that the class is intended to be a full substitute
for the class specified via TargetClass
. All methods in the target class that are not
substituted in the annotated class are implicitly treated as Delete
d.
See TargetClass
for an overview of the annotation system.
- Since:
- 22.3
-
Optional Element Summary
-
Element Details
-
polymorphicSignature
boolean polymorphicSignature- Since:
- 22.3
- Default:
false
-