< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java

Print this page




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.tools.jlink.plugin;
  26 
  27 import java.util.Collections;
  28 import java.util.EnumSet;
  29 import java.util.Map;
  30 import java.util.Set;
  31 import jdk.tools.jlink.internal.plugins.PluginsResourceBundle;
  32 
  33 /**
  34  * Base interface that jlink plugins should implement.
  35  */
  36 public interface Plugin {
  37 
  38     /**
  39      * Order of categories:
  40      * <ol>
  41      * <li>FILTER: Filter in/out resources or files.</li>
  42      * <li>TRANSFORMER: Transform resources or files(eg: refactoring, bytecode
  43      * manipulation).</li>
  44      * <li>MODULEINFO_TRANSFORMER: Transform only module-info.class</li>
  45      * <li>SORTER: Sort resources within the resource container.</li>
  46      * <li>COMPRESSOR: Compress resource within the resouce containers.</li>
  47      * <li>METAINFO_ADDER: Added meta info (like release, copyright etc.)</li>

  48      * <li>VERIFIER: Does some image verification.</li>
  49      * <li>PROCESSOR: Does some post processing on image.</li>
  50      * <li>PACKAGER: Final processing</li>
  51      * </ol>
  52      */
  53     public enum Category {
  54         FILTER("FILTER"),
  55         TRANSFORMER("TRANSFORMER"),
  56         MODULEINFO_TRANSFORMER("MODULEINFO_TRANSFORMER"),
  57         SORTER("SORTER"),
  58         COMPRESSOR("COMPRESSOR"),
  59         METAINFO_ADDER("METAINFO_ADDER"),

  60         VERIFIER("VERIFIER"),
  61         PROCESSOR("PROCESSOR"),
  62         PACKAGER("PACKAGER");
  63 
  64         private final String name;
  65 
  66         Category(String name) {
  67             this.name = name;
  68         }
  69 
  70         public String getName() {
  71             return name;
  72         }
  73     }
  74 
  75     /**
  76      * Plugin state:
  77      * <ul>
  78      * <li>DISABLED: The plugin is not exposed in help and will be not called.</li>
  79      * <li>AUTO_ENABLED: The plugin is enabled by default. It doesn't require its




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.tools.jlink.plugin;
  26 
  27 import java.util.Collections;
  28 import java.util.EnumSet;
  29 import java.util.Map;
  30 import java.util.Set;
  31 import jdk.tools.jlink.internal.plugins.PluginsResourceBundle;
  32 
  33 /**
  34  * Base interface that jlink plugins should implement.
  35  */
  36 public interface Plugin {
  37 
  38     /**
  39      * Order of categories matches the plugin sort order.
  40      * <ol>
  41      * <li>FILTER: Filter in/out resources or files.</li>
  42      * <li>TRANSFORMER: Transform resources or files(eg: refactoring, bytecode
  43      * manipulation).</li>
  44      * <li>MODULEINFO_TRANSFORMER: Transform only module-info.class</li>
  45      * <li>SORTER: Sort resources within the resource container.</li>

  46      * <li>METAINFO_ADDER: Added meta info (like release, copyright etc.)</li>
  47      * <li>COMPRESSOR: Compress resource within the resouce containers.</li>
  48      * <li>VERIFIER: Does some image verification.</li>
  49      * <li>PROCESSOR: Does some post processing on image.</li>
  50      * <li>PACKAGER: Final processing</li>
  51      * </ol>
  52      */
  53     public enum Category {
  54         FILTER("FILTER"),
  55         TRANSFORMER("TRANSFORMER"),
  56         MODULEINFO_TRANSFORMER("MODULEINFO_TRANSFORMER"),
  57         SORTER("SORTER"),

  58         METAINFO_ADDER("METAINFO_ADDER"),
  59         COMPRESSOR("COMPRESSOR"),
  60         VERIFIER("VERIFIER"),
  61         PROCESSOR("PROCESSOR"),
  62         PACKAGER("PACKAGER");
  63 
  64         private final String name;
  65 
  66         Category(String name) {
  67             this.name = name;
  68         }
  69 
  70         public String getName() {
  71             return name;
  72         }
  73     }
  74 
  75     /**
  76      * Plugin state:
  77      * <ul>
  78      * <li>DISABLED: The plugin is not exposed in help and will be not called.</li>
  79      * <li>AUTO_ENABLED: The plugin is enabled by default. It doesn't require its


< prev index next >