|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAnnotationGrammar
public abstract class AnnotationGrammar
Our base class for customizable annotation tag grammars. It has stock behavior for basic things like making sure required attributes exist, and provides plugin points for more complex checks.
Constructor Summary | |
---|---|
protected |
AnnotationGrammar(AnnotationProcessorEnvironment env,
Diagnostics diags,
String requiredRuntimeVersion,
RuntimeVersionChecker runtimeVersionChecker)
|
Method Summary | |
---|---|
protected void |
addError(AnnotationMirror element,
String key,
Object... args)
|
protected void |
addError(AnnotationValue element,
String key,
Object... args)
|
protected void |
addError(Declaration element,
String key,
Object... args)
|
protected void |
addMemberArrayGrammar(String memberName,
AnnotationGrammar grammar)
|
protected void |
addMemberGrammar(String memberName,
AnnotationGrammar grammar)
|
protected void |
addMemberType(String memberName,
AnnotationMemberType type)
|
protected void |
addWarning(AnnotationMirror element,
String key,
Object... args)
|
protected void |
addWarning(AnnotationValue element,
String key,
Object... args)
|
protected void |
addWarning(Declaration element,
String key,
Object... args)
|
boolean |
beginCheck(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember)
|
Object |
check(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember)
|
Object |
check(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember,
int annotationArrayIndex)
|
Object |
endCheck(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember,
Set wasPresent,
Map checkResults)
|
String[][] |
getAttrDependencies()
Each entry in this array (a String[]) is an array whose first element is an attribute that requires at least one of the subsequent elements to exist as an attribute. |
Diagnostics |
getDiagnostics()
|
AnnotationProcessorEnvironment |
getEnv()
|
String[][] |
getMutuallyExclusiveAttrs()
Each entry in this array (a String[]) lists mutually exclusive attributes. |
String[][] |
getRequiredAttrs()
Each entry in this array (a String[]) lists attributes of which one must exist in this tag. |
String |
getRequiredRuntimeVersion()
|
RuntimeVersionChecker |
getRuntimeVersionChecker()
|
protected boolean |
onBeginCheck(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember)
|
protected void |
onCheckMember(AnnotationTypeElementDeclaration memberDecl,
AnnotationValue member,
AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember)
|
protected Object |
onEndCheck(AnnotationMirror annotation,
AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember,
Map checkResults)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AnnotationGrammar(AnnotationProcessorEnvironment env, Diagnostics diags, String requiredRuntimeVersion, RuntimeVersionChecker runtimeVersionChecker)
requiredRuntimeVersion
- causes an error to be produced if the version in the manifest of beehive-netui-pageflow.jar
is not high enough.Method Detail |
---|
public AnnotationProcessorEnvironment getEnv()
public Diagnostics getDiagnostics()
public final Object check(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember)
public final Object check(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember, int annotationArrayIndex)
public final boolean beginCheck(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember)
protected void addError(Declaration element, String key, Object... args)
protected void addError(AnnotationValue element, String key, Object... args)
protected void addError(AnnotationMirror element, String key, Object... args)
protected void addWarning(Declaration element, String key, Object... args)
protected void addWarning(AnnotationValue element, String key, Object... args)
protected void addWarning(AnnotationMirror element, String key, Object... args)
public final Object endCheck(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember, Set wasPresent, Map checkResults)
null
.protected boolean onBeginCheck(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember)
protected Object onEndCheck(AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember, Map checkResults)
checkResults
- map of member-name (String) -> result-from-checking (Object)
null
.protected void onCheckMember(AnnotationTypeElementDeclaration memberDecl, AnnotationValue member, AnnotationMirror annotation, AnnotationMirror[] parentAnnotations, MemberDeclaration classMember)
public String[][] getMutuallyExclusiveAttrs()
public String[][] getRequiredAttrs()
public String[][] getAttrDependencies()
protected void addMemberGrammar(String memberName, AnnotationGrammar grammar)
protected void addMemberArrayGrammar(String memberName, AnnotationGrammar grammar)
protected void addMemberType(String memberName, AnnotationMemberType type)
public String getRequiredRuntimeVersion()
public RuntimeVersionChecker getRuntimeVersionChecker()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |