Class Attribute
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.xpath.Attribute
-
public class Attribute extends java.lang.Object
Represents an XPath attribute of a specific node. Attributes know their name, the node they wrap, and have access to their value.Two attributes are equal if they have the same name and their parent nodes are equal.
- Author:
- daniels
-
-
Constructor Summary
Constructors Constructor Description Attribute(Node parent, java.lang.String name, java.lang.reflect.Method m)
Creates a new attribute belonging to the given node using its accessor.Attribute(Node parent, java.lang.String name, java.lang.String value)
Creates a new attribute belonging to the given node using its string value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getName()
Node
getParent()
java.lang.String
getStringValue()
java.lang.Object
getValue()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Attribute
public Attribute(Node parent, java.lang.String name, java.lang.reflect.Method m)
Creates a new attribute belonging to the given node using its accessor.
-
Attribute
public Attribute(Node parent, java.lang.String name, java.lang.String value)
Creates a new attribute belonging to the given node using its string value.
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getParent
public Node getParent()
-
getValue
public java.lang.Object getValue()
-
getStringValue
public java.lang.String getStringValue()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-