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.- 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 java.lang.String
getName()
Node
getParent()
java.lang.String
getStringValue()
java.lang.Object
getValue()
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()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-