Class ActionRecorder

java.lang.Object
com.android.manifmerger.ActionRecorder

public class ActionRecorder extends Object
Records all the actions taken by the merging tool.

Each action generates at least one Actions.Record containing enough information to generate a machine or human readable report.

The records are not organized in a temporal structure as the merging tool takes such decisions but are keyed by xml elements and attributes. For each node (elements or attributes), a linked list of actions that happened to the node is recorded to display all decisions that were made for that particular node.

This structure will permit displaying logs with co-located decisions records for each element, for instance :

 activity:com.foo.bar.MyApp
     Added from manifest.xml:31
     Rejected from lib1_manifest.xml:65
 

Each record for a node (element or attribute) will contain the following metadata :

  • Actions.ActionType to identify whether the action applies to an attribute or an element.
  • SourceFilePosition to identify the source xml location for the node.

Elements will also contain:

  • Element name : a name composed of the element type and its key.
  • NodeOperationType the highest priority tool annotation justifying the merging tool decision.

While attributes will have:

  • element name
  • attribute name : the namespace aware xml name
  • AttributeOperationType the highest priority annotation justifying the merging tool decision.
  • Constructor Details

    • ActionRecorder

      public ActionRecorder()