Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.plugins.antlr.metadata
[Java] Class GrammarDelegate

    java.lang.Object
      org.gradle.api.plugins.antlr.metadata.GrammarDelegate

    public class GrammarDelegate

Antlr defines its antlr.preprocessor.Grammar class as package-protected for some unfortunate reason. So this class acts as a delegate to the Antlr antlr.preprocessor.Grammar class, hiding all the ugly necessary reflection code.

Authors:
  Steve Ebersole

Field Summary
`static Object[]` | `NO_ARGS`
`static Class[]` | `NO_ARG_SIGNATURE`

Constructor Summary
`GrammarDelegate(java.lang.Object antlrGrammarMetadata)`

Method Summary
`void` | `associateWith(GrammarMetadata associatedGrammarMetadata)`
`static java.util.List` | `extractGrammarDelegates(GrammarFile antlrGrammarFile)`
`GrammarMetadata` | `getAssociatedGrammarMetadata()`
`java.lang.String` | `getClassName()` Retrieves the unqualified name of the lexer/parser class.
`java.lang.String` | `getExportVocab()` Retrieves the name of this vocabulary exported by this grammar.
`java.lang.String` | `getImportVocab()` Retrieves the name of this vocabulary imported by this grammar.
`GrammarDelegate` | `getSuperGrammarDelegate()` Retrieves the grammar delegate associated with this grammars super grammar deduced during preprocessing from its extends clause.

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### NO_ARGS

    public static final Object[] NO_ARGS

### NO_ARG_SIGNATURE

    public static final Class[] NO_ARG_SIGNATURE

Constructor Detail

### GrammarDelegate

    public GrammarDelegate(java.lang.Object antlrGrammarMetadata)

Method Detail

### associateWith

    public void associateWith(GrammarMetadata associatedGrammarMetadata)

### extractGrammarDelegates

    public static java.util.List extractGrammarDelegates(GrammarFile antlrGrammarFile)

### getAssociatedGrammarMetadata

    public GrammarMetadata getAssociatedGrammarMetadata()

### getClassName

    public java.lang.String getClassName()

  Retrieves the unqualified name of the lexer/parser class.
  Returns:
    The unqualified lexer/parser class name.

### getExportVocab

    public java.lang.String getExportVocab()

  Retrieves the name of this vocabulary exported by this grammar.
  Returns:
    The gammar's exported vocabulary name.

### getImportVocab

    public java.lang.String getImportVocab()

  Retrieves the name of this vocabulary imported by this grammar.
  Returns:
    The gammar's imported vocabulary name.

### getSuperGrammarDelegate

    public GrammarDelegate getSuperGrammarDelegate()

  Retrieves the grammar delegate associated with this grammars super grammar deduced during preprocessing from its extends clause.
  Returns:
    The super-grammar grammar delegate

Groovy Documentation