Package com.android.manifmerger
Class XmlAttribute
java.lang.Object
com.android.manifmerger.XmlNode
com.android.manifmerger.XmlAttribute
Defines an XML attribute inside a
XmlElement.
Basically a facade object on Attr objects with some added features like automatic
namespace handling, manifest merger friendly identifiers and smart replacement of shortened
full qualified class names using manifest node's package setting from the the owning Android's
document.-
Nested Class Summary
Nested classes/interfaces inherited from class com.android.manifmerger.XmlNode
XmlNode.Name, XmlNode.NamespaceAwareName, XmlNode.NodeKey, XmlNode.NodeName -
Field Summary
Fields inherited from class com.android.manifmerger.XmlNode
NODE_TO_NAME -
Constructor Summary
ConstructorsConstructorDescriptionXmlAttribute(XmlElement ownerElement, Attr xml, com.android.manifmerger.AttributeModel attributeModel) Creates a new facade object to aAttrxml attribute in aXmlElement. -
Method Summary
Modifier and TypeMethodDescriptionstatic XmlAttributecreateXmlAttribute(XmlElement ownerElement, Attr attribute) getId()Returns a display friendly identification string that can be used in machine and user readable messages.com.android.manifmerger.AttributeModelgetModel()getName()Returns the attribute's name, providing isolation from details like namespaces handling.com.android.ide.common.blame.SourcePositionReturns the element's positioncom.android.ide.common.blame.SourceFileReturns the element's document xml source file location.getValue()Returns the attribute's valuegetXml()Returns the element's xmlvoidMethods inherited from class com.android.manifmerger.XmlNode
fromNSName, fromXmlName, getOriginalId, getSourceFilePosition, printPosition, unwrapName
-
Constructor Details
-
XmlAttribute
public XmlAttribute(@NonNull XmlElement ownerElement, @NonNull Attr xml, @Nullable com.android.manifmerger.AttributeModel attributeModel) Creates a new facade object to aAttrxml attribute in aXmlElement.- Parameters:
ownerElement- the xml node object owning this attribute.xml- the xml definition of the attribute.
-
-
Method Details
-
createXmlAttribute
-
getName
Returns the attribute's name, providing isolation from details like namespaces handling. -
getValue
Returns the attribute's value -
getId
Returns a display friendly identification string that can be used in machine and user readable messages. -
getPosition
@NonNull public com.android.ide.common.blame.SourcePosition getPosition()Description copied from class:XmlNodeReturns the element's position- Specified by:
getPositionin classXmlNode
-
getXml
Description copied from class:XmlNodeReturns the element's xml -
setValue
-
getModel
@Nullable public com.android.manifmerger.AttributeModel getModel() -
getSourceFile
@NonNull public com.android.ide.common.blame.SourceFile getSourceFile()Description copied from class:XmlNodeReturns the element's document xml source file location.- Specified by:
getSourceFilein classXmlNode
-