Class Attribute
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.xpath.Attribute
-
public class Attribute extends 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, String name, Method m)
Creates a new attribute belonging to the given node using its accessor.Attribute(Node parent, String name, 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(Object o)
String
getName()
Node
getParent()
String
getStringValue()
Class<?>
getType()
Returns the most general type that the value may be.Object
getValue()
int
hashCode()
String
replacementIfDeprecated()
Returns null for "not deprecated", empty string for "deprecated without replacement", otherwise name of replacement attribute.String
toString()
-
-
-
Method Detail
-
getName
public String getName()
-
getParent
public Node getParent()
-
getType
@Experimental public Class<?> getType()
Returns the most general type that the value may be.
-
replacementIfDeprecated
@InternalApi public String replacementIfDeprecated()
Returns null for "not deprecated", empty string for "deprecated without replacement", otherwise name of replacement attribute.
-
getValue
public Object getValue()
-
getStringValue
public String getStringValue()
-
-