Top Fields Constructors Methods
com.sun.tools.rngom.digested

pack-priv Class GrammarBuilderImpl

extends Object
implements Grammar, Div
Class Inheritance
All Implemented Interfaces
com.sun.tools.rngom.ast.builder.Div, com.sun.tools.rngom.ast.builder.GrammarSection, com.sun.tools.rngom.ast.builder.Grammar, com.sun.tools.rngom.ast.builder.Scope
Known Direct Subclasses
com.sun.tools.rngom.digested.IncludeImpl, com.sun.tools.rngom.digested.IncludeImpl.IncludedGrammarImpl
Imports
java.util.ArrayList, .List, com.sun.tools.rngom.ast.builder.Annotations, .CommentList, .Grammar, .Include, .Scope, .BuildException, .Div, com.sun.tools.rngom.ast.om.Location, .ParsedElementAnnotation, .ParsedPattern, com.sun.tools.rngom.ast.util.LocatorImpl, org.w3c.dom.Element

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private List<Element>
additionalElementAnnotations

Additional top-level element annotations.

protected final DGrammarPattern
protected final Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
protected final DSchemaBuilderImpl

Constructor Summary

AccessConstructor and Description
public
GrammarBuilderImpl(DGrammarPattern p, Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> parent, DSchemaBuilderImpl sb)

Method Summary

Modifier and TypeMethod and Description
public void
define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno)

Implements com.sun.tools.rngom.ast.builder.GrammarSection.define.

Called when a pattern is defined.

public void
public ParsedPattern
public Div<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
makeDiv()

Implements com.sun.tools.rngom.ast.builder.GrammarSection.makeDiv.

Called when <div> is found.

public Include<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
makeInclude()

Implements com.sun.tools.rngom.ast.builder.GrammarSection.makeInclude.

Returns null if already in an include.

public ParsedPattern
public ParsedPattern
public void
public void
topLevelComment(CommentList<L extends Location> comments)

Implements com.sun.tools.rngom.ast.builder.GrammarSection.topLevelComment.

Called when a comment is found.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

additionalElementAnnotationsback to summary
private List<Element> additionalElementAnnotations

Additional top-level element annotations. Can be null.

grammarback to summary
protected final DGrammarPattern grammar
parentback to summary
protected final Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> parent
sbback to summary
protected final DSchemaBuilderImpl sb

Constructor Detail

GrammarBuilderImplback to summary
public GrammarBuilderImpl(DGrammarPattern p, Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> parent, DSchemaBuilderImpl sb)

Method Detail

defineback to summary
public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.GrammarSection.define.

Doc from com.sun.tools.rngom.ast.builder.GrammarSection.define.

Called when a pattern is defined.

endDivback to summary
public void endDiv(Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.Div.endDiv.

endGrammarback to summary
public ParsedPattern endGrammar(Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.Grammar.endGrammar.

makeDivback to summary
public Div<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> makeDiv()

Implements com.sun.tools.rngom.ast.builder.GrammarSection.makeDiv.

Doc from com.sun.tools.rngom.ast.builder.GrammarSection.makeDiv.

Called when <div> is found.

makeIncludeback to summary
public Include<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> makeInclude()

Implements com.sun.tools.rngom.ast.builder.GrammarSection.makeInclude.

Doc from com.sun.tools.rngom.ast.builder.GrammarSection.makeInclude.

Returns null if already in an include.

makeParentRefback to summary
public ParsedPattern makeParentRef(String name, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.Scope.makeParentRef.

makeRefback to summary
public ParsedPattern makeRef(String name, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.Scope.makeRef.

topLevelAnnotationback to summary
public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException

Implements com.sun.tools.rngom.ast.builder.GrammarSection.topLevelAnnotation.

Doc from com.sun.tools.rngom.ast.builder.GrammarSection.topLevelAnnotation.

Called when an annotation is found.

topLevelCommentback to summary
public void topLevelComment(CommentList<L extends Location> comments) throws BuildException

Implements com.sun.tools.rngom.ast.builder.GrammarSection.topLevelComment.

Doc from com.sun.tools.rngom.ast.builder.GrammarSection.topLevelComment.

Called when a comment is found.