Package proguard.io

Class ClassPathEntry


  • public class ClassPathEntry
    extends java.lang.Object
    This class represents an entry from a class path: an apk, a jar, an aar, a war, a zip, an ear, or a directory. It has a name, and a flag to indicate whether the entry is an input entry or an output entry.

    It also has an optional feature name that can serve as a tag to indicate the group to which the entry belongs, e.g. a given Android dynamic feature.

    It also has optional filters for the names of the contained resource/classes, apks, jars, aars, wars, ears, and zips.

    • Constructor Summary

      Constructors 
      Constructor Description
      ClassPathEntry​(java.io.File file, boolean isOutput)
      Creates a new ClassPathEntry with the given file and output flag.
      ClassPathEntry​(java.io.File file, boolean isOutput, java.lang.String featureName)
      Creates a new ClassPathEntry with the given file, output flag, and optional feature name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAabFilter()
      Returns the name filter that is applied to aab files in this entry, if any.
      java.util.List<java.lang.String> getAarFilter()
      Returns the name filter that is applied to aar files in this entry, if any.
      java.util.List<java.lang.String> getApkFilter()
      Returns the name filter that is applied to apk files in this entry, if any.
      java.util.List<java.lang.String> getEarFilter()
      Returns the name filter that is applied to ear files in this entry, if any.
      java.lang.String getFeatureName()
      Returns the feature name.
      java.io.File getFile()
      Returns the file.
      java.util.List<java.lang.String> getFilter()
      Returns the name filter that is applied to bottom-level files in this entry.
      java.util.List<java.lang.String> getJarFilter()
      Returns the name filter that is applied to jar files in this entry, if any.
      java.util.List<java.lang.String> getJmodFilter()
      Returns the name filter that is applied to jmod files in this entry, if any.
      java.lang.String getName()
      Returns the path name of the entry.
      java.util.List<java.lang.String> getWarFilter()
      Returns the name filter that is applied to war files in this entry, if any.
      java.util.List<java.lang.String> getZipFilter()
      Returns the name filter that is applied to zip files in this entry, if any.
      boolean isAab()
      Returns whether this data entry is an aab file.
      boolean isAar()
      Returns whether this data entry is an aar file.
      boolean isApk()
      Returns whether this data entry is an apk file.
      boolean isDex()
      Returns whether this data entry is a dex file.
      boolean isEar()
      Returns whether this data entry is a ear file.
      boolean isFiltered()
      Returns whether this data entry has any kind of filter.
      boolean isJar()
      Returns whether this data entry is a jar file.
      boolean isJmod()
      Returns whether this data entry is a jmod file.
      boolean isOutput()
      Returns whether this data entry is an output entry.
      boolean isWar()
      Returns whether this data entry is a war file.
      boolean isZip()
      Returns whether this data entry is a zip file.
      void setAabFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to aab files in this entry, if any.
      void setAarFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to aar files in this entry, if any.
      void setApkFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to apk files in this entry, if any.
      void setEarFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to ear files in this entry, if any.
      void setFeatureName​(java.lang.String featureName)
      Sets the feature name.
      void setFile​(java.io.File file)
      Sets the file.
      void setFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to bottom-level files in this entry.
      void setJarFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to jar files in this entry, if any.
      void setJmodFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to jmod files in this entry, if any.
      void setOutput​(boolean output)
      Specifies whether this data entry is an output entry.
      void setWarFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to war files in this entry, if any.
      void setZipFilter​(java.util.List<java.lang.String> filter)
      Sets the name filter that is applied to zip files in this entry, if any.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ClassPathEntry

        public ClassPathEntry​(java.io.File file,
                              boolean isOutput)
        Creates a new ClassPathEntry with the given file and output flag.
      • ClassPathEntry

        public ClassPathEntry​(java.io.File file,
                              boolean isOutput,
                              java.lang.String featureName)
        Creates a new ClassPathEntry with the given file, output flag, and optional feature name.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the path name of the entry.
      • getFile

        public java.io.File getFile()
        Returns the file.
      • setFile

        public void setFile​(java.io.File file)
        Sets the file.
      • isOutput

        public boolean isOutput()
        Returns whether this data entry is an output entry.
      • setOutput

        public void setOutput​(boolean output)
        Specifies whether this data entry is an output entry.
      • getFeatureName

        public java.lang.String getFeatureName()
        Returns the feature name.
      • setFeatureName

        public void setFeatureName​(java.lang.String featureName)
        Sets the feature name.
      • isDex

        public boolean isDex()
        Returns whether this data entry is a dex file.
      • isApk

        public boolean isApk()
        Returns whether this data entry is an apk file.
      • isAab

        public boolean isAab()
        Returns whether this data entry is an aab file.
      • isJar

        public boolean isJar()
        Returns whether this data entry is a jar file.
      • isAar

        public boolean isAar()
        Returns whether this data entry is an aar file.
      • isWar

        public boolean isWar()
        Returns whether this data entry is a war file.
      • isEar

        public boolean isEar()
        Returns whether this data entry is a ear file.
      • isJmod

        public boolean isJmod()
        Returns whether this data entry is a jmod file.
      • isZip

        public boolean isZip()
        Returns whether this data entry is a zip file.
      • isFiltered

        public boolean isFiltered()
        Returns whether this data entry has any kind of filter.
      • getFilter

        public java.util.List<java.lang.String> getFilter()
        Returns the name filter that is applied to bottom-level files in this entry.
      • setFilter

        public void setFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to bottom-level files in this entry.
      • getApkFilter

        public java.util.List<java.lang.String> getApkFilter()
        Returns the name filter that is applied to apk files in this entry, if any.
      • setApkFilter

        public void setApkFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to apk files in this entry, if any.
      • getAabFilter

        public java.util.List<java.lang.String> getAabFilter()
        Returns the name filter that is applied to aab files in this entry, if any.
      • setAabFilter

        public void setAabFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to aab files in this entry, if any.
      • getJarFilter

        public java.util.List<java.lang.String> getJarFilter()
        Returns the name filter that is applied to jar files in this entry, if any.
      • setJarFilter

        public void setJarFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to jar files in this entry, if any.
      • getAarFilter

        public java.util.List<java.lang.String> getAarFilter()
        Returns the name filter that is applied to aar files in this entry, if any.
      • setAarFilter

        public void setAarFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to aar files in this entry, if any.
      • getWarFilter

        public java.util.List<java.lang.String> getWarFilter()
        Returns the name filter that is applied to war files in this entry, if any.
      • setWarFilter

        public void setWarFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to war files in this entry, if any.
      • getEarFilter

        public java.util.List<java.lang.String> getEarFilter()
        Returns the name filter that is applied to ear files in this entry, if any.
      • setEarFilter

        public void setEarFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to ear files in this entry, if any.
      • getJmodFilter

        public java.util.List<java.lang.String> getJmodFilter()
        Returns the name filter that is applied to jmod files in this entry, if any.
      • setJmodFilter

        public void setJmodFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to jmod files in this entry, if any.
      • getZipFilter

        public java.util.List<java.lang.String> getZipFilter()
        Returns the name filter that is applied to zip files in this entry, if any.
      • setZipFilter

        public void setZipFilter​(java.util.List<java.lang.String> filter)
        Sets the name filter that is applied to zip files in this entry, if any.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object