Class YGuardBaseTask

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    ObfuscatorTask, ShrinkTask, YGuardTask

    public abstract class YGuardBaseTask
    extends org.apache.tools.ant.Task
    The type Y guard base task.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<AttributesSection> attributesSections
      The Attributes sections.
      protected boolean mode
      The Mode.
      protected static boolean MODE_NESTED
      The constant MODE_NESTED.
      protected static boolean MODE_STANDALONE
      The constant MODE_STANDALONE.
      protected java.util.List<ShrinkBag> pairs
      The Pairs.
      protected java.util.Map properties
      The Properties.
      protected org.apache.tools.ant.types.Path resourceClassPath
      The Resource class path.
      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Constructor Summary

      Constructors 
      Constructor Description
      YGuardBaseTask()
      Instantiates a new Y guard base task.
      YGuardBaseTask​(boolean mode)
      Instantiates a new Y guard base task.
    • Field Detail

      • MODE_STANDALONE

        protected static final boolean MODE_STANDALONE
        The constant MODE_STANDALONE.
        See Also:
        Constant Field Values
      • MODE_NESTED

        protected static final boolean MODE_NESTED
        The constant MODE_NESTED.
        See Also:
        Constant Field Values
      • mode

        protected final boolean mode
        The Mode.
      • pairs

        protected java.util.List<ShrinkBag> pairs
        The Pairs.
      • resourceClassPath

        protected org.apache.tools.ant.types.Path resourceClassPath
        The Resource class path.
      • attributesSections

        protected java.util.List<AttributesSection> attributesSections
        The Attributes sections.
      • properties

        protected java.util.Map properties
        The Properties.
    • Constructor Detail

      • YGuardBaseTask

        public YGuardBaseTask()
        Instantiates a new Y guard base task.
      • YGuardBaseTask

        public YGuardBaseTask​(boolean mode)
        Instantiates a new Y guard base task.
        Parameters:
        mode - the mode
    • Method Detail

      • createAttribute

        public AttributesSection createAttribute()
        Create attribute attributes section.
        Returns:
        the attributes section
      • newAttributesSection

        protected AttributesSection newAttributesSection()
        Instantiates an attributes section, subclasses may provide custom implementations.
        Returns:
        the new attributes section
      • createInOutPair

        public ShrinkBag createInOutPair()
        Create in out pair shrink bag.
        Returns:
        the shrink bag
      • newInOutPair

        protected InOutPair newInOutPair()
        Instantiates an in out pair shrink bag, subclasses may provide custom implementations.
        Returns:
        the new shrink bag
      • addConfiguredInOutPairs

        public void addConfiguredInOutPairs​(YGuardBaseTask.InOutPairSection section)
        Add configured in out pairs.
        Parameters:
        section - the section
      • addConfiguredInOutPair

        public void addConfiguredInOutPair​(ShrinkBag pair)
        Add configured in out pair.
        Parameters:
        pair - the pair
      • createExternalClasses

        public org.apache.tools.ant.types.Path createExternalClasses()
        Create external classes path.
        Returns:
        the path
      • setResourceClassPath

        public void setResourceClassPath​(org.apache.tools.ant.types.Path path)
        Sets resource class path.
        Parameters:
        path - the path
      • createKeep

        public abstract Exclude createKeep()
        Create keep exclude.
        Returns:
        the exclude
      • addAttributesSections

        public abstract void addAttributesSections​(java.util.List<AttributesSection> attributesSections)
        Add attributes sections.
        Parameters:
        attributesSections - the attributes sections
      • addConfiguredProperty

        public void addConfiguredProperty​(Property p)
        Add configured property.
        Parameters:
        p - the p