@Retention(value=RUNTIME) @Target(value={TYPE,CONSTRUCTOR,METHOD,FIELD}) public @interface RuleDependency
| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends Recognizer<?,?>> |
recognizer |
int |
rule |
int |
version |
| Modifier and Type | Optional Element and Description |
|---|---|
Dependents[] |
dependents
Specifies the set of grammar rules related to
rule() which the
annotated element depends on. |
public abstract Class<? extends Recognizer<?,?>> recognizer
public abstract Dependents[] dependents
rule() which the
annotated element depends on. Even when absent from this set, the
annotated element is implicitly dependent upon the explicitly specified
rule(), which corresponds to the Dependents.SELF element.
By default, the annotated element is dependent upon the specified
rule() and its Dependents.PARENTS, i.e. the rule within
one level of context information. The parents are included since the most
frequent assumption about a rule is where it's used in the grammar.Copyright © 1992–2024 Daniel Sun. All rights reserved.