Module com.sun.xml.bind.core
Interface MaybeElement<T,C>
-
- All Superinterfaces:
Locatable,NonElement<T,C>,TypeInfo<T,C>
- All Known Subinterfaces:
BuiltinLeafInfo<T,C>,ClassInfo<T,C>,EnumLeafInfo<T,C>,LeafInfo<T,C>
public interface MaybeElement<T,C> extends NonElement<T,C>
SomeNonElementcan optionally be anElement. This interface captures such characteristics.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
ANYTYPE_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Element<T,C>asElement()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.-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.Locatable
getLocation, getUpstream
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
getTypeName, isSimpleType
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.TypeInfo
canBeReferencedByIDREF, getType
-
-
-
-
Method Detail
-
isElement
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.
-
getElementName
QName getElementName()
Gets the element name of the class, if the class is bound to an element.- Returns:
- non-null iff
isElement().
-
asElement
Element<T,C> asElement()
- Returns:
- null if
isElement()==false, non-null ifisElement()==true.
-
-