Top Description Methods
org.intellij.lang.annotations

public @Interface Subst

extends Annotation
Annotations
@Retention:CLASS
@Target:METHOD, FIELD, LOCAL_VARIABLE, PARAMETER
Imports
java.lang.annotation.*

Specifies the replacement value for non-constant variables and method return values. This may help static analyzers to properly parse the concatenation of several values which is used in @Language or Pattern context.

Example:

@Subst("Tahoma")
final String font = new JLabel().getFont().getName();

@Language("HTML")
String message = "<html><span style='font: " + font + "; font-size:smaller'>"
  + ... + "</span></html>";

Here the parser assumes that when font appears in the concatenation its value is "Tahoma", so it can continue parsing the concatenation.

See Also
Language, Pattern

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()