org.apache.ws.jaxme.xs

Class XSElementOrAttrRef


public final class XSElementOrAttrRef
extends java.lang.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, XSIdentityConstraint

Constructor Summary

XSElementOrAttrRef(XSAttribute attribute)
XSElementOrAttrRef(XSElement element)

Method Summary

boolean
equals(Object o)
XSAttribute
getAttribute()
Fetches the attribute that this reference refers to.
XSElement
getElement()
Fetches the element that this reference refers to.
int
hashCode()
boolean
isAttributeRef()
Returns true if this reference points at an attribute.

Constructor Details

XSElementOrAttrRef

public XSElementOrAttrRef(XSAttribute attribute)

XSElementOrAttrRef

public XSElementOrAttrRef(XSElement element)

Method Details

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.