Package relaxngcc
Class NGCCGrammar
- java.lang.Object
-
- relaxngcc.NGCCGrammar
-
public class NGCCGrammar extends java.lang.ObjectKeeps information about the global setting effective across the entire grammar.A "grammar" in RELAX NG could be nested inside another grammar, so we need a bit different name. This class needs a better name.
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringglobalBodyglobally effective <java-body> statements.java.lang.StringglobalImportDeclsglobally effective import statements.GrammargrammarParsed grammar.java.lang.StringpackageNamePackage name to which generated classes should go.
-
Constructor Summary
Constructors Constructor Description NGCCGrammar(Grammar g, java.lang.String pkgName, java.lang.String runtime, java.lang.String globalImport, java.lang.String globalBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildAutomaton()voiddump(java.io.PrintStream strm)voiddumpAutomata(java.io.File outDir)generates automaton gif files.java.lang.StringgetRuntimeTypeFullName()java.lang.StringgetRuntimeTypeShortName()Gets the class name of the runtime type alone without the package name.ScopeInfogetScopeInfo(Scope scope)java.util.IteratoriterateScopeInfos()booleanoutput(Options opt, long sourceTimestamp)Generates the source code.
-
-
-
Field Detail
-
grammar
public final Grammar grammar
Parsed grammar.
-
packageName
public final java.lang.String packageName
Package name to which generated classes should go. The value will be the empty string if the classes will be generated into the root package.
-
globalImportDecls
public final java.lang.String globalImportDecls
globally effective import statements.
-
globalBody
public final java.lang.String globalBody
globally effective <java-body> statements.
-
-
Constructor Detail
-
NGCCGrammar
public NGCCGrammar(Grammar g, java.lang.String pkgName, java.lang.String runtime, java.lang.String globalImport, java.lang.String globalBody)
-
-
Method Detail
-
getRuntimeTypeShortName
public java.lang.String getRuntimeTypeShortName()
Gets the class name of the runtime type alone without the package name.
-
getRuntimeTypeFullName
public java.lang.String getRuntimeTypeFullName()
-
iterateScopeInfos
public java.util.Iterator iterateScopeInfos()
-
buildAutomaton
public void buildAutomaton()
-
dump
public void dump(java.io.PrintStream strm)
-
dumpAutomata
public void dumpAutomata(java.io.File outDir)
generates automaton gif files.
-
output
public boolean output(Options opt, long sourceTimestamp) throws java.io.IOException, NoDefinitionException
Generates the source code.- Returns:
- true if files are in fact generated.
- Throws:
java.io.IOExceptionNoDefinitionException
-
-