com.sun.tools.xjc.reader.dtd.bindinfo

Class BIElement

public final class BIElement extends Object

<element> declaration in the binding file.
Field Summary
CClassInfoclazz
The bean representation for this element.
BindInfoparent
The parent BindInfo object to which this object belongs.
Constructor Summary
BIElement(BindInfo bi, Element _e)
Wraps a given <element> element in the binding file.
Method Summary
BIAttributeattribute(String name)
Gets the attribute-property declaration, if any.
BIConversionconversion(String name)
Resolves the conversion name to the conversion declaration.
voiddeclareConstructors(CClassInfo src)
Creates constructor declarations for this element.
StringgetClassName()
Gets the JClass object that represents this declaration.
List<BIContent>getContents()
Iterates all content-property declarations (except 'rest').
BIConversiongetConversion()
Gets the conversion method for this element.
LocatorgetLocation()
Gets the source location where this element is declared.
BIContentgetRest()
Gets the 'rest' content-property declaration, if any.
LocatorgetSourceLocation()
Gets the location where this declaration is declared.
booleanisClass()
Checks if the element type is "class".
booleanisRoot()
Checks if this element is designated as a root element.
Stringname()
Gets the element name.

Field Detail

clazz

public final CClassInfo clazz
The bean representation for this element.

parent

final BindInfo parent
The parent BindInfo object to which this object belongs.

Constructor Detail

BIElement

BIElement(BindInfo bi, Element _e)
Wraps a given <element> element in the binding file.

Should be created only from BindInfo.

Method Detail

attribute

public BIAttribute attribute(String name)
Gets the attribute-property declaration, if any.

Returns: null if attribute declaration was not given by that name.

conversion

public BIConversion conversion(String name)
Resolves the conversion name to the conversion declaration.

Element-local declarations are checked first.

Returns: A non-null valid BIConversion object.

declareConstructors

public void declareConstructors(CClassInfo src)
Creates constructor declarations for this element.

This method should only be called by DTDReader after the normalization has completed.

Parameters: src The ClassItem object that corresponds to this declaration

getClassName

public String getClassName()
Gets the JClass object that represents this declaration.

This method returns null if this declaration is an element-property declaration.

getContents

public List<BIContent> getContents()
Iterates all content-property declarations (except 'rest').

getConversion

public BIConversion getConversion()
Gets the conversion method for this element.

This method can be called only when this element declaration is designated as element-value.

Returns: If the convert attribute is not specified, this method returns null.

getLocation

public Locator getLocation()
Gets the source location where this element is declared.

getRest

public BIContent getRest()
Gets the 'rest' content-property declaration, if any.

Returns: if there is no 'rest' declaration, return null.

getSourceLocation

public Locator getSourceLocation()
Gets the location where this declaration is declared.

isClass

public boolean isClass()
Checks if the element type is "class". If false, that means this element will be a value.

isRoot

public boolean isRoot()
Checks if this element is designated as a root element.

name

public String name()
Gets the element name.