< prev index next >

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

Print this page




 303                 (s, p) -> null
 304             );
 305 
 306     static final StandardBundlerParam<String> IDENTIFIER =
 307             new StandardBundlerParam<>(
 308                     "identifier.default",
 309                     String.class,
 310                     params -> {
 311                         String s = MAIN_CLASS.fetchFrom(params);
 312                         if (s == null) return null;
 313 
 314                         int idx = s.lastIndexOf(".");
 315                         if (idx >= 1) {
 316                             return s.substring(0, idx);
 317                         }
 318                         return s;
 319                     },
 320                     (s, p) -> s
 321             );
 322 










 323     static final StandardBundlerParam<Boolean> VERBOSE  =
 324             new StandardBundlerParam<>(
 325                     Arguments.CLIOptions.VERBOSE.getId(),
 326                     Boolean.class,
 327                     params -> false,
 328                     // valueOf(null) is false, and we actually do want null
 329                     (s, p) -> (s == null || "null".equalsIgnoreCase(s)) ?
 330                             true : Boolean.valueOf(s)
 331             );
 332 
 333     static final StandardBundlerParam<File> RESOURCE_DIR =
 334             new StandardBundlerParam<>(
 335                     Arguments.CLIOptions.RESOURCE_DIR.getId(),
 336                     File.class,
 337                     params -> null,
 338                     (s, p) -> new File(s)
 339             );
 340 
 341     static final BundlerParamInfo<String> INSTALL_DIR =
 342             new StandardBundlerParam<>(




 303                 (s, p) -> null
 304             );
 305 
 306     static final StandardBundlerParam<String> IDENTIFIER =
 307             new StandardBundlerParam<>(
 308                     "identifier.default",
 309                     String.class,
 310                     params -> {
 311                         String s = MAIN_CLASS.fetchFrom(params);
 312                         if (s == null) return null;
 313 
 314                         int idx = s.lastIndexOf(".");
 315                         if (idx >= 1) {
 316                             return s.substring(0, idx);
 317                         }
 318                         return s;
 319                     },
 320                     (s, p) -> s
 321             );
 322 
 323     static final StandardBundlerParam<Boolean> BIND_SERVICES =
 324             new StandardBundlerParam<>(
 325                     Arguments.CLIOptions.BIND_SERVICES.getId(),
 326                     Boolean.class,
 327                     params -> false,
 328                     (s, p) -> (s == null || "null".equalsIgnoreCase(s)) ?
 329                             true : Boolean.valueOf(s)
 330             );
 331 
 332 
 333     static final StandardBundlerParam<Boolean> VERBOSE  =
 334             new StandardBundlerParam<>(
 335                     Arguments.CLIOptions.VERBOSE.getId(),
 336                     Boolean.class,
 337                     params -> false,
 338                     // valueOf(null) is false, and we actually do want null
 339                     (s, p) -> (s == null || "null".equalsIgnoreCase(s)) ?
 340                             true : Boolean.valueOf(s)
 341             );
 342 
 343     static final StandardBundlerParam<File> RESOURCE_DIR =
 344             new StandardBundlerParam<>(
 345                     Arguments.CLIOptions.RESOURCE_DIR.getId(),
 346                     File.class,
 347                     params -> null,
 348                     (s, p) -> new File(s)
 349             );
 350 
 351     static final BundlerParamInfo<String> INSTALL_DIR =
 352             new StandardBundlerParam<>(


< prev index next >