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

public final Class BIElement

extends Object
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, javax.xml.namespace.QName, com.sun.tools.xjc.model.CClassInfo, org.glassfish.jaxb.core.api.impl.NameConverter, org.w3c.dom.Element, org.xml.sax.Locator

<element> declaration in the binding file.

Field Summary

Modifier and TypeField and Description
private final Map<String, BIAttribute>
attributes

Attribute-property declarations.

private final String
className

the class which is generated by this declaration.

public final CClassInfo
clazz

The bean representation for this element.

private final List<BIConstructor>
constructors

Constructor declarations.

private final List<BIContent>
contents

Content-property declarations.

private final Map<String, BIConversion>
conversions

Conversion declarations.

private final Element
e

<element> element which this object is wrapping.

pack-priv final BindInfo
parent

The parent BindInfo object to which this object belongs.

private BIContent
rest

The "rest" content-property declaration.

Constructor Summary

AccessConstructor and Description
pack-priv
BIElement(BindInfo bi, Element _e)

Wraps a given <element> element in the binding file.

Method Summary

Modifier and TypeMethod and Description
public BIAttribute

Returns:

null if attribute declaration was not given by that name.
attribute
(String name)

Gets the attribute-property declaration, if any.

public BIConversion

Returns:

A non-null valid BIConversion object.
conversion
(String name)

Resolves the conversion name to the conversion declaration.

public void
declareConstructors(CClassInfo
The ClassItem object that corresponds to this declaration
src
)

Creates constructor declarations for this element.

public String
getClassName()

Gets the JClass object that represents this declaration.

public List<BIContent>
getContents()

Iterates all content-property declarations (except 'rest').

public BIConversion

Returns:

If the convert attribute is not specified, this method returns null.
getConversion
()

Gets the conversion method for this element.

public Locator
getLocation()

Gets the source location where this element is declared.

public BIContent

Returns:

if there is no 'rest' declaration, return null.
getRest
()

Gets the 'rest' content-property declaration, if any.

public Locator
getSourceLocation()

Gets the location where this declaration is declared.

public boolean
isClass()

Checks if the element type is "class".

public boolean
isRoot()

Checks if this element is designated as a root element.

public String
name()

Gets the element name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributesback to summary
private final Map<String, BIAttribute> attributes

Attribute-property declarations.

classNameback to summary
private final String className

the class which is generated by this declaration. This field will be null if this declaration is an element-property declaration.

clazzback to summary
public final CClassInfo clazz

The bean representation for this element.

constructorsback to summary
private final List<BIConstructor> constructors

Constructor declarations.

contentsback to summary
private final List<BIContent> contents

Content-property declarations.

This vector will be empty if no content-property declaration is made.

conversionsback to summary
private final Map<String, BIConversion> conversions

Conversion declarations.

eback to summary
private final Element e

<element> element which this object is wrapping.

parentback to summary
pack-priv final BindInfo parent

The parent BindInfo object to which this object belongs.

restback to summary
private BIContent rest

The "rest" content-property declaration.

This field is null when there was no "rest" declaration.

Constructor Detail

BIElementback to summary
pack-priv BIElement(BindInfo bi, Element _e)

Wraps a given <element> element in the binding file.

Should be created only from BindInfo.

Method Detail

attributeback to summary
public BIAttribute attribute(String name)

Gets the attribute-property declaration, if any.

Returns:BIAttribute

null if attribute declaration was not given by that name.

conversionback to summary
public BIConversion conversion(String name)

Resolves the conversion name to the conversion declaration.

Element-local declarations are checked first.

Returns:BIConversion

A non-null valid BIConversion object.

declareConstructorsback to summary
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:CClassInfo

The ClassItem object that corresponds to this declaration

getClassNameback to summary
public String getClassName()

Gets the JClass object that represents this declaration.

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

getContentsback to summary
public List<BIContent> getContents()

Iterates all content-property declarations (except 'rest').

getConversionback to summary
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:BIConversion

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

getLocationback to summary
public Locator getLocation()

Gets the source location where this element is declared.

getRestback to summary
public BIContent getRest()

Gets the 'rest' content-property declaration, if any.

Returns:BIContent

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

getSourceLocationback to summary
public Locator getSourceLocation()

Gets the location where this declaration is declared.

isClassback to summary
public boolean isClass()

Checks if the element type is "class". If false, that means this element will be a value.

isRootback to summary
public boolean isRoot()

Checks if this element is designated as a root element.

nameback to summary
public String name()

Gets the element name.