org.apache.ws.jaxme.xs

Class XSElementOrAttrRef

public final class XSElementOrAttrRef extends Object

Specifies an element or attribute relative to the declaring element. The reference cannot be to an element and a attribute, one of the two getters must return null.

Author: Chris Kirk

See Also: XSElement

Constructor Summary
XSElementOrAttrRef(XSElement element)
XSElementOrAttrRef(XSAttribute attribute)
Method Summary
booleanequals(Object o)
XSAttributegetAttribute()
Fetches the attribute that this reference refers to.
XSElementgetElement()
Fetches the element that this reference refers to.
inthashCode()
booleanisAttributeRef()
Returns true if this reference points at an attribute.

Constructor Detail

XSElementOrAttrRef

public XSElementOrAttrRef(XSElement element)

XSElementOrAttrRef

public XSElementOrAttrRef(XSAttribute attribute)

Method Detail

equals

public boolean equals(Object o)

getAttribute

public XSAttribute getAttribute()
Fetches the attribute that this reference refers to. Returns null when isAttributeRef is false.

getElement

public XSElement getElement()
Fetches the element that this reference refers to. Returns null when isAttributeRef is true.

hashCode

public int hashCode()

isAttributeRef

public boolean isAttributeRef()
Returns true if this reference points at an attribute. Returns false when it references an element.