org.apache.ws.jaxme.xs
Class XSElementOrAttrRef

java.lang.Object
  extended by org.apache.ws.jaxme.xs.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(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSElementOrAttrRef

public XSElementOrAttrRef(XSElement element)

XSElementOrAttrRef

public XSElementOrAttrRef(XSAttribute attribute)
Method Detail

getElement

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


getAttribute

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


isAttributeRef

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


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object