com.sun.xml.bind.v2.model.core

Interface MaybeElement<T,C>

public interface MaybeElement<T,C> extends NonElement<T,C>

Some NonElement can optionally be an Element. This interface captures such characteristics.
Method Summary
Element<T,C>asElement()
Returns the Element aspect of this ClassInfo.
QNamegetElementName()
Gets the element name of the class, if the class is bound to an element.
booleanisElement()
If the class is bound to an element, return true.

Method Detail

asElement

public Element<T,C> asElement()
Returns the Element aspect of this ClassInfo.

Returns: null if isElement==false, non-null if isElement==true.

getElementName

public QName getElementName()
Gets the element name of the class, if the class is bound to an element.

Returns: non-null iff isElement.

isElement

public boolean isElement()
If the class is bound to an element, return true.

Note that when this is true, the class is bound to both an element and a type.