Top Description Fields Constructors Methods
com.sun.tools.xjc.reader.dtd

pack-priv final Class Element

extends Term
implements Comparable<Element>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.ArrayList, .HashSet, .List, .Set, javax.xml.namespace.QName, com.sun.tools.xjc.model.CBuiltinLeafInfo, .CClassInfo, .CElementPropertyInfo, .CPropertyInfo, .CReferencePropertyInfo, .CTypeRef, .CValuePropertyInfo, .TypeUse, com.sun.tools.xjc.reader.dtd.bindinfo.BIConversion, .BIElement, org.glassfish.jaxb.core.v2.model.core.ID, .WildcardMode, com.sun.xml.dtdparser.DTDEventListener, org.xml.sax.Locator

DTD Element.

This class extends Term to participate in the content model tree.

This class is repsonsible for binding the element.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
pack-priv final List<CPropertyInfo>
attributes

List of attribute properties on this element

private CClassInfo
classInfo

If this element maps to a class, that class representation.

private boolean
classInfoComputed

True if classInfo field is computed.

private Term
private short
pack-priv boolean
isReferenced

True if this element is referenced from another element.

private Locator
locator

The source location where this element is defined.

private boolean
mustBeClass

True if this element needs to be a class.

pack-priv final String
name

Name of the element.

private final List<Block>
normalizedBlocks

Normalized blocks of the content model.

private final TDTDReader
Inherited from com.sun.tools.xjc.reader.dtd.Term:
EMPTY

Constructor Summary

AccessConstructor and Description
public
Element(TDTDReader owner, String name)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
bind()

private CClassInfo
public int
compareTo(Element that)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

private CClassInfo
pack-priv void
define(short contentModelType, Term contentModel, Locator locator)

Define its content model.

pack-priv CClassInfo
getClassInfo()

Return null if this class is not bound to a class.

private TypeUse
getConversion()

When this element is an PCDATA-only content model, returns the conversion for it.

pack-priv boolean
pack-priv boolean
pack-priv void
normalize(List<Block> r, boolean optional)

Implements abstract com.sun.tools.xjc.reader.dtd.Term.normalize.

Field Detail

attributesback to summary
pack-priv final List<CPropertyInfo> attributes

List of attribute properties on this element

classInfoback to summary
private CClassInfo classInfo

If this element maps to a class, that class representation. Otherwise null.

classInfoComputedback to summary
private boolean classInfoComputed

True if classInfo field is computed.

contentModelback to summary
private Term contentModel
contentModelTypeback to summary
private short contentModelType
See Also
DTDEventListener#endContentModel(String, short)
isReferencedback to summary
pack-priv boolean isReferenced

True if this element is referenced from another element.

locatorback to summary
private Locator locator

The source location where this element is defined.

mustBeClassback to summary
private boolean mustBeClass

True if this element needs to be a class. Currently, if an element is referenced from a construct like (A|B|C), we require those A,B, and C to be a class.

nameback to summary
pack-priv final String name

Name of the element.

normalizedBlocksback to summary
private final List<Block> normalizedBlocks

Normalized blocks of the content model.

ownerback to summary
private final TDTDReader owner

Constructor Detail

Elementback to summary
public Element(TDTDReader owner, String name)

Method Detail

addAllElementsback to summary
pack-priv void addAllElements(Block b)

Implements abstract com.sun.tools.xjc.reader.dtd.Term.addAllElements.

Annotations
@Override
bindback to summary
pack-priv void bind()
calcClassback to summary
private CClassInfo calcClass()
compareToback to summary
public int compareTo(Element that)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Annotations
@Override
createDefaultClassback to summary
private CClassInfo createDefaultClass()
defineback to summary
pack-priv void define(short contentModelType, Term contentModel, Locator locator)

Define its content model.

getClassInfoback to summary
pack-priv CClassInfo getClassInfo()

Return null if this class is not bound to a class.

getConversionback to summary
private TypeUse getConversion()

When this element is an PCDATA-only content model, returns the conversion for it. Otherwise the behavior is undefined.

isOptionalback to summary
pack-priv boolean isOptional()

Implements abstract com.sun.tools.xjc.reader.dtd.Term.isOptional.

Annotations
@Override
isRepeatedback to summary
pack-priv boolean isRepeated()

Implements abstract com.sun.tools.xjc.reader.dtd.Term.isRepeated.

Annotations
@Override
normalizeback to summary
pack-priv void normalize(List<Block> r, boolean optional)

Implements abstract com.sun.tools.xjc.reader.dtd.Term.normalize.

Annotations
@Override