|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.manifmerger.XmlNode
com.android.manifmerger.OrphanXmlElement
com.android.manifmerger.XmlElement
public class XmlElement
Xml Element
which is mergeable.
A mergeable element can contains 3 types of children :
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.android.manifmerger.XmlNode |
---|
XmlNode.NodeKey, XmlNode.NodeName |
Field Summary |
---|
Fields inherited from class com.android.manifmerger.XmlNode |
---|
NODE_TO_NAME |
Constructor Summary | |
---|---|
XmlElement(org.w3c.dom.Element xml,
XmlDocument document)
|
Method Summary | |
---|---|
com.google.common.base.Optional<java.lang.String> |
compareTo(XmlElement otherNode)
Compares this element with another XmlElement ignoring all attributes belonging to
the SdkConstants.TOOLS_URI namespace. |
com.google.common.base.Optional<XmlAttribute> |
getAttribute(XmlNode.NodeName attributeName)
Returns the XmlAttribute for an attribute present on this
xml element, or Optional.absent() if not present. |
java.util.Collection<java.util.Map.Entry<XmlNode.NodeName,com.android.manifmerger.AttributeOperationType>> |
getAttributeOperations()
|
com.android.manifmerger.AttributeOperationType |
getAttributeOperationType(XmlNode.NodeName attributeName)
Get the attribute operation type as optionally specified by the user. |
java.util.List<XmlAttribute> |
getAttributes()
Returns the list of attributes for this xml element. |
XmlDocument |
getDocument()
Returns the owning XmlDocument |
com.google.common.collect.ImmutableList<XmlElement> |
getMergeableElements()
|
com.google.common.base.Optional<XmlElement> |
getNodeByTypeAndKey(com.android.manifmerger.ManifestModel.NodeTypes type,
java.lang.String keyValue)
|
NodeOperationType |
getOperationType()
Get the node operation type as optionally specified by the user. |
com.android.utils.PositionXmlParser.Position |
getPosition()
Returns the element's position |
XmlLoader.SourceLocation |
getSourceLocation()
Returns the element's document xml source file location. |
void |
mergeChildren(XmlElement lowerPriorityNode,
com.android.manifmerger.MergingReport.Builder mergingReport)
|
void |
mergeWithLowerPriorityNode(XmlElement lowerPriorityNode,
com.android.manifmerger.MergingReport.Builder mergingReport)
Merge this xml element with a lower priority node. |
Methods inherited from class com.android.manifmerger.OrphanXmlElement |
---|
getId, getKey, getName, getType, getXml, isA |
Methods inherited from class com.android.manifmerger.XmlNode |
---|
fromNSName, fromXmlName, getColumn, getLine, printPosition, printPosition, unwrapName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlElement(@NonNull org.w3c.dom.Element xml, @NonNull XmlDocument document)
Method Detail |
---|
@NonNull public XmlDocument getDocument()
XmlDocument
public java.util.List<XmlAttribute> getAttributes()
public com.google.common.base.Optional<XmlAttribute> getAttribute(XmlNode.NodeName attributeName)
XmlAttribute
for an attribute present on this
xml element, or Optional.absent()
if not present.
attributeName
- the attribute name.public NodeOperationType getOperationType()
NodeOperationType.MERGE
will be returned.
public com.android.manifmerger.AttributeOperationType getAttributeOperationType(XmlNode.NodeName attributeName)
AttributeOperationType.STRICT
will be returned.
public java.util.Collection<java.util.Map.Entry<XmlNode.NodeName,com.android.manifmerger.AttributeOperationType>> getAttributeOperations()
public com.android.utils.PositionXmlParser.Position getPosition()
XmlNode
getPosition
in class OrphanXmlElement
@NonNull public XmlLoader.SourceLocation getSourceLocation()
XmlNode
getSourceLocation
in class OrphanXmlElement
public void mergeWithLowerPriorityNode(XmlElement lowerPriorityNode, com.android.manifmerger.MergingReport.Builder mergingReport)
lowerPriorityNode
- lower priority Xml element to merge with.mergingReport
- the merging report to log errors and actions.public com.google.common.collect.ImmutableList<XmlElement> getMergeableElements()
public com.google.common.base.Optional<XmlElement> getNodeByTypeAndKey(com.android.manifmerger.ManifestModel.NodeTypes type, @Nullable java.lang.String keyValue)
public void mergeChildren(XmlElement lowerPriorityNode, com.android.manifmerger.MergingReport.Builder mergingReport)
public com.google.common.base.Optional<java.lang.String> compareTo(XmlElement otherNode)
XmlElement
ignoring all attributes belonging to
the SdkConstants.TOOLS_URI
namespace.
otherNode
- the other element to compare against.
String
describing the differences between the two XML elements or
Optional.absent()
if they are equals.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |