| java.lang.Object com.sun.xml.bind.v2.schemagen.Tree
Tree | abstract class Tree (Code) | | Normalized representation of the content model.
This is built from bottom up so that we can eliminate redundant constructs,
and produce the most concise content model definition in XML.
author: Kohsuke Kawaguchi |
Inner Class :abstract static class Term extends Tree | |
Method Summary | |
boolean | canBeTopLevel() Returns true if the top node of this tree can
appear as a valid top-level content model in XML Schema. | abstract boolean | isNullable() Returns true if this tree accepts empty sequence. | static Tree | makeGroup(GroupKind kind, List<Tree> children) Returns a group tree. | Tree | makeOptional(boolean really) Returns "T?" from "T".
Parameters: really - if false this method becomes no-op. | Tree | makeRepeated(boolean really) Returns "T+" from "T".
Parameters: really - if false this method becomes no-op. | abstract protected void | write(ContentModelContainer parent, boolean isOptional, boolean repeated) Writes out the content model. | protected void | write(TypeDefParticle ct) Writes inside the given complex type. | final protected void | writeOccurs(Occurs o, boolean isOptional, boolean repeated) Convenience method to write occurrence constraints. |
canBeTopLevel | boolean canBeTopLevel()(Code) | | Returns true if the top node of this tree can
appear as a valid top-level content model in XML Schema.
Model groups and occurrences that have model group in it can.
|
isNullable | abstract boolean isNullable()(Code) | | Returns true if this tree accepts empty sequence.
|
makeOptional | Tree makeOptional(boolean really)(Code) | | Returns "T?" from "T".
Parameters: really - if false this method becomes no-op. This is so that we can writethe caller fluently. |
makeRepeated | Tree makeRepeated(boolean really)(Code) | | Returns "T+" from "T".
Parameters: really - if false this method becomes no-op. This is so that we can writethe caller fluently. |
write | abstract protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated)(Code) | | Writes out the content model.
Normall this runs recursively until we write out the whole content model.
|
writeOccurs | final protected void writeOccurs(Occurs o, boolean isOptional, boolean repeated)(Code) | | Convenience method to write occurrence constraints.
|
|
|