Discouraged

@Retention(value = SOURCE)  @Target(value = ) annotation Discouraged


Denotes that the annotated element, while not disallowed or deprecated, is one that programmers are generally discouraged from using.

Example:

 @Discouraged(message = "It is much more efficient to retrieve "
                          + "resources by identifier than by name.")
 public void getValue(String name) {
     ...
 }

Summary

Public methods

abstract String

Defines the message to display when an element marked with this annotation is used.

Public methods

message

public abstract String message()

Defines the message to display when an element marked with this annotation is used. An alternative should be provided in the message.