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>, RuntimeBuiltinLeafInfo, RuntimeClassInfo, RuntimeEnumLeafInfo, RuntimeLeafInfo
All Known Implementing Classes:
BuiltinLeafInfoImpl, CBuiltinLeafInfo, CClassInfo, CEnumLeafInfo, ClassInfoImpl, RuntimeBuiltinLeafInfoImpl

public interface MaybeElement<T,C> extends NonElement<T,C>
Some NonElement can optionally be an Element. This interface captures such characteristics.
Author:
Kohsuke Kawaguchi
  • Method Details

    • 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 the Element aspect of this ClassInfo.
      Returns:
      null if isElement()==false, non-null if isElement()==true.