Top Description Fields Methods
org.glassfish.jaxb.core.v2.model.core

public Interface MaybeElement<T, C>

extends NonElement<T, C>
Known Direct Subinterfaces
org.glassfish.jaxb.core.v2.model.core.ClassInfo, org.glassfish.jaxb.core.v2.model.core.LeafInfo
Imports
javax.xml.namespace.QName

Some NonElement can optionally be an Element. This interface captures such characteristics.
Author
Kohsuke Kawaguchi

Field Summary

Inherited from org.glassfish.jaxb.core.v2.model.core.NonElement:
ANYTYPE_NAME

Method Summary

Modifier and TypeMethod and Description
public Element<T, C>

Returns:

null if isElement()==false, non-null if isElement()==true.
asElement
()

Returns the Element aspect of this ClassInfo.

public QName

Returns:

non-null iff isElement().
getElementName
()

Gets the element name of the class, if the class is bound to an element.

public boolean
isElement()

If the class is bound to an element, return true.

Inherited from org.glassfish.jaxb.core.v2.model.core.NonElement:
getTypeNameisSimpleType

Method Detail

asElementback to summary
public Element<T, C> asElement()

Returns the Element aspect of this ClassInfo.

Returns:Element<T, C>

null if isElement()==false, non-null if isElement()==true.

getElementNameback to summary
public QName getElementName()

Gets the element name of the class, if the class is bound to an element.

Returns:QName

non-null iff isElement().

isElementback to summary
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.