< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/builder/ImageBuilder.java

Print this page




  25 package jdk.tools.jlink.builder;
  26 
  27 import java.io.DataOutputStream;
  28 import java.util.Properties;
  29 
  30 import jdk.tools.jlink.plugin.ExecutableImage;
  31 import jdk.tools.jlink.plugin.PluginException;
  32 import jdk.tools.jlink.plugin.Pool;
  33 
  34 /**
  35  * Implement this interface to develop your own image layout. First the jimage
  36  * is written onto the output stream returned by getOutputStream then storeFiles
  37  * is called.
  38  */
  39 public interface ImageBuilder {
  40 
  41     /**
  42      * Store the external files.
  43      *
  44      * @param content Pool of module content.
  45      * @param bom The options used to build the image file.
  46      * @param release the release properties
  47      * @throws PluginException
  48      */
  49     public default void storeFiles(Pool content, String bom, Properties release) {
  50         storeFiles(content, bom);
  51     }
  52 
  53     /**
  54      * Store the external files.
  55      *
  56      * @param content Pool of module content.
  57      * @param bom The options used to build the image file.
  58      * @throws PluginException
  59      */
  60     public default void storeFiles(Pool content, String bom) {
  61         throw new UnsupportedOperationException("storeFiles");
  62     }
  63 
  64     /**
  65      * The OutputStream to store the jimage file.
  66      *
  67      * @return The output stream
  68      * @throws PluginException
  69      */
  70     public DataOutputStream getJImageOutputStream();
  71 
  72     /**
  73      * Gets the executable image that is generated.
  74      *
  75      * @return The executable image.
  76      * @throws PluginException
  77      */
  78     public ExecutableImage getExecutableImage();
  79 }


  25 package jdk.tools.jlink.builder;
  26 
  27 import java.io.DataOutputStream;
  28 import java.util.Properties;
  29 
  30 import jdk.tools.jlink.plugin.ExecutableImage;
  31 import jdk.tools.jlink.plugin.PluginException;
  32 import jdk.tools.jlink.plugin.Pool;
  33 
  34 /**
  35  * Implement this interface to develop your own image layout. First the jimage
  36  * is written onto the output stream returned by getOutputStream then storeFiles
  37  * is called.
  38  */
  39 public interface ImageBuilder {
  40 
  41     /**
  42      * Store the external files.
  43      *
  44      * @param content Pool of module content.

  45      * @param release the release properties
  46      * @throws PluginException
  47      */
  48     public default void storeFiles(Pool content, Properties release) {
  49         storeFiles(content);
  50     }
  51 
  52     /**
  53      * Store the external files.
  54      *
  55      * @param content Pool of module content.

  56      * @throws PluginException
  57      */
  58     public default void storeFiles(Pool content) {
  59         throw new UnsupportedOperationException("storeFiles");
  60     }
  61 
  62     /**
  63      * The OutputStream to store the jimage file.
  64      *
  65      * @return The output stream
  66      * @throws PluginException
  67      */
  68     public DataOutputStream getJImageOutputStream();
  69 
  70     /**
  71      * Gets the executable image that is generated.
  72      *
  73      * @return The executable image.
  74      * @throws PluginException
  75      */
  76     public ExecutableImage getExecutableImage();
  77 }
< prev index next >