Class SelectiveJarResource

  • All Implemented Interfaces:, java.lang.AutoCloseable, ResourceFactory

    public class SelectiveJarResource
    extends JarResource
    SelectiveJarResource Selectively copies resources from a jar file based on includes/excludes.
    • Field Detail


        public static final java.util.List<java.lang.String> DEFAULT_INCLUDES
        Default matches every resource.

        public static final java.util.List<java.lang.String> DEFAULT_EXCLUDES
        Default is to exclude nothing.
    • Constructor Detail

      • SelectiveJarResource

        public SelectiveJarResource​( url)
      • SelectiveJarResource

        public SelectiveJarResource​( url,
                                    boolean useCaches)
    • Method Detail

      • setCaseSensitive

        public void setCaseSensitive​(boolean caseSensitive)
      • setIncludes

        public void setIncludes​(java.util.List<java.lang.String> patterns)
      • setExcludes

        public void setExcludes​(java.util.List<java.lang.String> patterns)
      • isIncluded

        protected boolean isIncluded​(java.lang.String name)
      • isExcluded

        protected boolean isExcluded​(java.lang.String name)
      • copyTo

        public void copyTo​( directory)
        Description copied from class: Resource
        Copy the Resource to the new destination file.

        Will not replace existing destination file.

        copyTo in class JarResource
        directory - the destination file to create
        Throws: - if unable to copy the resource