< prev index next >

src/jdk.jpackage/share/classes/jdk/jpackage/internal/BundlerParamInfo.java

Print this page




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 
  26 package jdk.jpackage.internal;
  27 
  28 import java.util.Map;
  29 import java.util.function.BiFunction;
  30 import java.util.function.Function;
  31 
  32 /**
  33  * BundlerParamInfo<T>
  34  *
  35  * A BundlerParamInfo encapsulates an individual bundler parameter of type <T>.
  36  */
  37 class BundlerParamInfo<T> {
  38     /**
  39      * The user friendly name of the parameter
  40      */
  41     String name;
  42 
  43     /**
  44      * A more verbose description of the parameter
  45      */
  46     String description;
  47 
  48     /**
  49      * The command line and hashmap name of the parameter
  50      */
  51     String id;
  52 
  53     /**
  54      * Type of the parameter
  55      */
  56     Class<T> valueType;
  57 
  58     /**
  59      * Indicates if value was set using default value function
  60      */
  61     boolean isDefaultValue;
  62 
  63     /**
  64      * If the value is not set, and no fallback value is found,
  65      * the parameter uses the value returned by the producer.
  66      */
  67     Function<Map<String, ? super Object>, T> defaultValueFunction;
  68 
  69     /**
  70      * An optional string converter for command line arguments.
  71      */
  72     BiFunction<String, Map<String, ? super Object>, T> stringConverter;
  73 
  74     String getName() {
  75         return name;
  76     }
  77 
  78     void setName(String name) {
  79         this.name = name;
  80     }
  81 
  82     String getDescription() {
  83         return description;
  84     }
  85 
  86     void setDescription(String description) {
  87         this.description = description;
  88     }
  89 
  90     String getID() {
  91         return id;
  92     }
  93 
  94     Class<T> getValueType() {
  95         return valueType;
  96     }
  97 
  98     void setValueType(Class<T> valueType) {
  99         this.valueType = valueType;
 100     }
 101 
 102     boolean getIsDefaultValue() {
 103         return isDefaultValue;
 104     }
 105 
 106     Function<Map<String, ? super Object>, T> getDefaultValueFunction() {
 107         return defaultValueFunction;
 108     }




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 
  26 package jdk.jpackage.internal;
  27 
  28 import java.util.Map;
  29 import java.util.function.BiFunction;
  30 import java.util.function.Function;
  31 
  32 /**
  33  * BundlerParamInfo<T>
  34  *
  35  * A BundlerParamInfo encapsulates an individual bundler parameter of type <T>.
  36  */
  37 class BundlerParamInfo<T> {









  38 
  39     /**
  40      * The command line and hashmap name of the parameter
  41      */
  42     String id;
  43 
  44     /**
  45      * Type of the parameter
  46      */
  47     Class<T> valueType;
  48 
  49     /**
  50      * Indicates if value was set using default value function
  51      */
  52     boolean isDefaultValue;
  53 
  54     /**
  55      * If the value is not set, and no fallback value is found,
  56      * the parameter uses the value returned by the producer.
  57      */
  58     Function<Map<String, ? super Object>, T> defaultValueFunction;
  59 
  60     /**
  61      * An optional string converter for command line arguments.
  62      */
  63     BiFunction<String, Map<String, ? super Object>, T> stringConverter;
















  64 
  65     String getID() {
  66         return id;
  67     }
  68 
  69     Class<T> getValueType() {
  70         return valueType;
  71     }
  72 
  73     void setValueType(Class<T> valueType) {
  74         this.valueType = valueType;
  75     }
  76 
  77     boolean getIsDefaultValue() {
  78         return isDefaultValue;
  79     }
  80 
  81     Function<Map<String, ? super Object>, T> getDefaultValueFunction() {
  82         return defaultValueFunction;
  83     }


< prev index next >