@Immutable
public class Actions
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Actions.ActionType
Defines all possible actions taken from the merging tool for an xml element or attribute.
|
static class |
Actions.AttributeRecord
Defines a merging tool action for an xml attribute
|
static class |
Actions.NodeRecord
Defines a merging tool action for an xml element.
|
static class |
Actions.Record
Defines an abstract record contain common metadata for elements and attributes actions.
|
| Constructor and Description |
|---|
Actions(java.util.Map<XmlNode.NodeKey,com.android.manifmerger.Actions.DecisionTreeRecord> records) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
blame(XmlDocument xmlDocument) |
com.google.common.collect.ImmutableList<Actions.AttributeRecord> |
getAttributeRecords(XmlNode.NodeKey elementKey,
XmlNode.NodeName attributeName)
Returns the
ImmutableList of Actions.AttributeRecord for
the attribute identified by attributeName of the element identified by elementKey. |
java.util.Set<XmlNode.NodeKey> |
getNodeKeys()
Returns a
ImmutableSet of all the element's keys that have
at least one Actions.NodeRecord. |
com.google.common.collect.ImmutableList<Actions.NodeRecord> |
getNodeRecords(XmlNode.NodeKey key)
Returns an
ImmutableList of Actions.NodeRecord for the element identified with the
passed key. |
com.google.common.collect.ImmutableList<XmlNode.NodeName> |
getRecordedAttributeNames(XmlNode.NodeKey nodeKey)
Returns a
ImmutableList of all attributes names that have at least one record for
the element identified with the passed key. |
com.google.common.collect.ImmutableMultimap<java.lang.Integer,Actions.Record> |
getResultingSourceMapping(XmlDocument xmlDocument) |
static Actions |
load(java.io.InputStream inputStream) |
static Actions |
load(java.lang.String xml) |
java.lang.String |
persist() |
public Actions(java.util.Map<XmlNode.NodeKey,com.android.manifmerger.Actions.DecisionTreeRecord> records)
@NonNull public java.util.Set<XmlNode.NodeKey> getNodeKeys()
ImmutableSet of all the element's keys that have
at least one Actions.NodeRecord.@NonNull public com.google.common.collect.ImmutableList<Actions.NodeRecord> getNodeRecords(XmlNode.NodeKey key)
ImmutableList of Actions.NodeRecord for the element identified with the
passed key.@NonNull public com.google.common.collect.ImmutableList<XmlNode.NodeName> getRecordedAttributeNames(XmlNode.NodeKey nodeKey)
ImmutableList of all attributes names that have at least one record for
the element identified with the passed key.@NonNull public com.google.common.collect.ImmutableList<Actions.AttributeRecord> getAttributeRecords(XmlNode.NodeKey elementKey, XmlNode.NodeName attributeName)
ImmutableList of Actions.AttributeRecord for
the attribute identified by attributeName of the element identified by elementKey.@NonNull
public java.lang.String persist()
throws java.io.IOException
java.io.IOException@Nullable public static Actions load(@NonNull java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException@Nullable public static Actions load(java.lang.String xml)
public com.google.common.collect.ImmutableMultimap<java.lang.Integer,Actions.Record> getResultingSourceMapping(@NonNull XmlDocument xmlDocument) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException@NonNull
public java.lang.String blame(@NonNull
XmlDocument xmlDocument)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException