Enum Class NodeOperationType

java.lang.Object
java.lang.Enum<NodeOperationType>
com.android.manifmerger.NodeOperationType
All Implemented Interfaces:
ConvertibleName, Serializable, Comparable<NodeOperationType>, Constable

public enum NodeOperationType extends Enum<NodeOperationType> implements ConvertibleName
Defines node operation types as it can be provided by user's through attributes on the target xml element.

Example:


     <activity android:name="com.foo.bar.ActivityUI"
          tools:node="remove_children">
     </activity>
 
  • Enum Constant Details

    • MERGE

      public static final NodeOperationType MERGE
      Merges further definitions of the same element with this one.
    • MERGE_ONLY_ATTRIBUTES

      public static final NodeOperationType MERGE_ONLY_ATTRIBUTES
      Remove all children from the target element before merging it into the resulting merged manifest. This basically merges attributes only (attributes annotation still applies).
    • REPLACE

      public static final NodeOperationType REPLACE
      Replace further definitions of the same element with this one. There can be 0..n similar elements replaced with the annotated xml element.
    • REMOVE

      public static final NodeOperationType REMOVE
      Remove the next definition of the same element from the resulting merged manifest. There can be only one similar element removed. If further definition are encountered, a merging failure will be initiated.
    • REMOVE_ALL

      public static final NodeOperationType REMOVE_ALL
      Remove all definitions of the same element from the resulting merged manifest.
    • REMOVE_CHILDREN

      public static final NodeOperationType REMOVE_CHILDREN
      Remove all children from the target element before merging it into the resulting merged manifest. This basically merges all attributes only (attributes annotation still applies).
    • STRICT

      public static final NodeOperationType STRICT
      No further definition of this element should be encountered. A merging tool failure will be generated if there is one.
  • Method Details

    • values

      public static NodeOperationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NodeOperationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSelectable

      public boolean isSelectable()
      Returns true if this operation supports a Selector
    • toXmlName

      public String toXmlName()
      Description copied from interface: ConvertibleName
      Returns a xml lower-hyphen separated name of itself.
      Specified by:
      toXmlName in interface ConvertibleName
    • toCamelCaseName

      public String toCamelCaseName()
      Description copied from interface: ConvertibleName
      Returns a camel case version of itself.
      Specified by:
      toCamelCaseName in interface ConvertibleName
    • isOverriding

      public boolean isOverriding()
      Returns true if the element will override (remove or replace) lower priority elements.