Class AXmlElement

java.lang.Object
soot.jimple.infoflow.android.axml.AXmlElement
Direct Known Subclasses:
AXmlAttribute, AXmlNode

public abstract class AXmlElement extends Object
Basic class for all classes which represent elements from an Android XML file. Provides functionality to either include or exclude the element from the XML.
Author:
Stefan Haas, Mario Schlipf
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    The added flag determines wheter this element was part of a parsed xml file or added afterwards.
    protected boolean
    The include flag determines whether this element will be written out in the document.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AXmlElement(String ns, boolean added)
    Constructor for a new Android XML Element.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the include flag to false so that the manifest will not contain information about this element.
    Returns the namespace of this element.
    void
    Sets the include flag to true so that the manifest will contain information about this element.
    protected void
    include(boolean include)
    Sets the include flag to the passed boolean value.
    boolean
    Returns wheter this element was part of a parsed xml file or added afterwards.
    boolean
    Returns the current value of the include flag.
    void
    setAdded(boolean added)
    The added flag determines wheter this element was part of a parsed xml file or added afterwards.
    void
    Sets the namespace of this element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • include

      protected boolean include
      The include flag determines whether this element will be written out in the document.
    • added

      protected boolean added
      The added flag determines wheter this element was part of a parsed xml file or added afterwards.
  • Constructor Details

    • AXmlElement

      public AXmlElement(String ns, boolean added)
      Constructor for a new Android XML Element.
      Parameters:
      ns - namespace of this element.
      added - wheter this element was part of a parsed xml file or added afterwards.
  • Method Details

    • getNamespace

      public String getNamespace()
      Returns the namespace of this element.
      Returns:
      the element's namespace
    • setNamespace

      public void setNamespace(String ns)
      Sets the namespace of this element.
      Parameters:
      ns - the element's namespace
    • setAdded

      public void setAdded(boolean added)
      The added flag determines wheter this element was part of a parsed xml file or added afterwards.
      Parameters:
      added -
    • isAdded

      public boolean isAdded()
      Returns wheter this element was part of a parsed xml file or added afterwards.
      Returns:
      added flag
    • isIncluded

      public boolean isIncluded()
      Returns the current value of the include flag. If true the manifest will contain information about this element.
      Returns:
      whether or not the element will be included in the manifest
    • include

      public void include()
      Sets the include flag to true so that the manifest will contain information about this element.
    • exclude

      public void exclude()
      Sets the include flag to false so that the manifest will not contain information about this element.
    • include

      protected void include(boolean include)
      Sets the include flag to the passed boolean value. If given true this element will be included in the manifest.
      Parameters:
      included - value for the include flag