|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented @Restriction @Target(value=METHOD) @Retention(value=CLASS) public @interface Constant
Restriction that denotes that the return value of a method is always
the same object. This does not necessary mean that the returned
object is a singleton.
Although theoretically a method may be constant and still not
Transparent - because of not being SideEffectFree, in
practice this is a bug source. Thus, Constant annotated methods
must be Transparent, and they do not need to be
annotated with that annotation too, as it is implied.
Constant methods must be not null, thus they do not need to
be annotated as NonNull, as it is implied
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||