@Documented
@Retention(value=CLASS)
@Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,ANNOTATION_TYPE})
public @interface Language
This annotation also could be used as a meta-annotation, to define derived annotations for convenience. E.g. the following annotation could be defined to annotate the strings that represent Java methods:
@Language(value = "JAVA", prefix = "class X{", suffix = "}") @interface JavaMethod {}
Note that using the derived annotation as meta-annotation is not supported. Meta-annotation works only one level deep.
Modifier and Type | Required Element and Description |
---|---|
@NonNls java.lang.String |
value
Language name like "JAVA", "HTML", "XML", "RegExp", etc.
|
Modifier and Type | Optional Element and Description |
---|---|
@NonNls java.lang.String |
prefix
A constant prefix that is assumed to be implicitly added before the literal.
|
@NonNls java.lang.String |
suffix
A constant suffix that is assumed to be implicitly added after the literal.
|
@NonNls public abstract @NonNls java.lang.String value
Pattern
@NonNls public abstract @NonNls java.lang.String prefix
void methodProcessor(@Language(value="JAVA", prefix="class X {", suffix="}")
.