Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.jpackage.jmod - JPackage Tool
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool,
which can be invoked by the "jpackage" command.
JDK 17 JPackage tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jpackage.jmod.
JDK 17 JPackage tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JPackage tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jpackage.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jpackage/internal/BundlerParamInfo.java
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.jpackage.internal;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Function;
/**
* BundlerParamInfo<T>
*
* A BundlerParamInfo encapsulates an individual bundler parameter of type <T>.
*/
class BundlerParamInfo<T> {
/**
* The command line and hashmap name of the parameter
*/
String id;
/**
* Type of the parameter
*/
Class<T> valueType;
/**
* Indicates if value was set using default value function
*/
boolean isDefaultValue;
/**
* If the value is not set, and no fallback value is found,
* the parameter uses the value returned by the producer.
*/
Function<Map<String, ? super Object>, T> defaultValueFunction;
/**
* An optional string converter for command line arguments.
*/
BiFunction<String, Map<String, ? super Object>, T> stringConverter;
String getID() {
return id;
}
Class<T> getValueType() {
return valueType;
}
boolean getIsDefaultValue() {
return isDefaultValue;
}
Function<Map<String, ? super Object>, T> getDefaultValueFunction() {
return defaultValueFunction;
}
BiFunction<String, Map<String, ? super Object>,T>
getStringConverter() {
return stringConverter;
}
@SuppressWarnings("unchecked")
final T fetchFrom(Map<String, ? super Object> params) {
return fetchFrom(params, true);
}
@SuppressWarnings("unchecked")
final T fetchFrom(Map<String, ? super Object> params,
boolean invokeDefault) {
Object o = params.get(getID());
if (o instanceof String && getStringConverter() != null) {
return getStringConverter().apply((String)o, params);
}
Class<T> klass = getValueType();
if (klass.isInstance(o)) {
return (T) o;
}
if (o != null) {
throw new IllegalArgumentException("Param " + getID()
+ " should be of type " + getValueType()
+ " but is a " + o.getClass());
}
if (params.containsKey(getID())) {
// explicit nulls are allowed
return null;
}
if (invokeDefault && (getDefaultValueFunction() != null)) {
T result = getDefaultValueFunction().apply(params);
if (result != null) {
params.put(getID(), result);
isDefaultValue = true;
}
return result;
}
// ultimate fallback
return null;
}
}
⏎ jdk/jpackage/internal/BundlerParamInfo.java
Or download all of them as a single archive file:
File name: jdk.jpackage-17.0.5-src.zip File size: 92069 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jshell.jmod - JShell Tool
2023-08-03, ≈15🔥, 0💬
Popular Posts:
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
Where to get the Java source code for Connector/J 8.0 Core API module? Java source code files for Co...
How to download and install ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is a Java 5 J...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.0.2? The if y...