Package com.android.manifmerger
Class ManifestModel
java.lang.Object
com.android.manifmerger.ManifestModel
- All Implemented Interfaces:
com.android.manifmerger.DocumentModel<com.android.manifmerger.ManifestModel.NodeTypes>
@Immutable
public class ManifestModel
extends Object
implements com.android.manifmerger.DocumentModel<com.android.manifmerger.ManifestModel.NodeTypes>
Model for the manifest file merging activities.
This model will describe each element that is eligible for merging and associated merging policies. It is not reusable as most of its interfaces are private but a future enhancement could easily make this more generic/reusable if we need to merge more than manifest files.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a DocumentModel to be used for merging Android manifest documentsManifestModel(boolean autoReject) Creates a DocumentModel to be used for merging Android manifest documents -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.android.manifmerger.ManifestModel.NodeTypesfromXmlSimpleName(String xmlSimpleName) Returns theManifestModel.NodeTypesinstance from an xml element name (without namespace decoration).toXmlName(com.android.manifmerger.ManifestModel.NodeTypes type) Returns the Xml name for this node type
-
Constructor Details
-
ManifestModel
public ManifestModel()Creates a DocumentModel to be used for merging Android manifest documents -
ManifestModel
public ManifestModel(boolean autoReject) Creates a DocumentModel to be used for merging Android manifest documents- Parameters:
autoReject- specifies whether model can ignore conflicts in attribute values when merging manifest documents and simply reject value from the lower priority document
-
-
Method Details
-
toXmlName
Returns the Xml name for this node type- Specified by:
toXmlNamein interfacecom.android.manifmerger.DocumentModel<com.android.manifmerger.ManifestModel.NodeTypes>
-
fromXmlSimpleName
Returns theManifestModel.NodeTypesinstance from an xml element name (without namespace decoration). For instance, an xml element
has a xml simple name of "activity" which will resolve to<activity android:name="foo"> ... </activity>ManifestModel.NodeTypes.ACTIVITYvalue.Note : a runtime exception will be generated if no mapping from the simple name to a
ManifestModel.NodeTypesexists.- Specified by:
fromXmlSimpleNamein interfacecom.android.manifmerger.DocumentModel<com.android.manifmerger.ManifestModel.NodeTypes>- Parameters:
xmlSimpleName- the xml (lower-hyphen separated words) simple name.- Returns:
- the
ManifestModel.NodeTypesassociated with that element name.
-
autoRejectConflicts
public boolean autoRejectConflicts()- Specified by:
autoRejectConflictsin interfacecom.android.manifmerger.DocumentModel<com.android.manifmerger.ManifestModel.NodeTypes>
-