Class JARDesc
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.resource.JARDesc
The JAR element.
This class is immutable and thread safe
- Version:
- $Revision: 1.6 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanwhether the JAR can be cachedstatic final Stringstatic final Stringprivate final booleanwhether to load the JAR on demandprivate final URLthe location of the JAR fileprivate final booleanwhether the JAR contains the main classstatic final Stringprivate final booleanwhether the JAR contains native librariesprivate final Stringthe part namestatic final Stringprivate VersionStringThe required JAR version.static final String -
Constructor Summary
ConstructorsConstructorDescriptionJARDesc(URL location, VersionString version, String part, boolean lazy, boolean main, boolean nativeJar, boolean cacheable) Create a JAR descriptor. -
Method Summary
Modifier and TypeMethodDescriptiongetPart()booleanReturns if this jar is cacheablebooleanisEager()booleanisLazy()booleanisMain()booleanisNative()voidsetVersion(VersionString version)
-
Field Details
-
HREF_ATTRIBUTE
- See Also:
-
VERSION_ATTRIBUTE
- See Also:
-
MAIN_ATTRIBUTE
- See Also:
-
DOWNLOAD_ATTRIBUTE
- See Also:
-
PART_ATTRIBUTE
- See Also:
-
location
the location of the JAR file -
version
The required JAR version. The version attribute can specify an exact version or a list of versions (version string). See JSR-56, section 3.4 for details. -
part
the part name -
lazy
private final boolean lazywhether to load the JAR on demand -
main
private final boolean mainwhether the JAR contains the main class -
nativeJar
private final boolean nativeJarwhether the JAR contains native libraries -
cacheable
private final boolean cacheablewhether the JAR can be cached
-
-
Constructor Details
-
JARDesc
public JARDesc(URL location, VersionString version, String part, boolean lazy, boolean main, boolean nativeJar, boolean cacheable) Create a JAR descriptor.- Parameters:
location- the location of the JAR fileversion- the required JAR versions, or nullpart- the part name, or nulllazy- whether to load the JAR on demandmain- whether the JAR contains the main classnativeJar- whether the JAR contains native librariescacheable- whether the JAR can be cached or not
-
-
Method Details
-
getLocation
- Returns:
- the URL of the JAR file.
-
getVersion
- Returns:
- the required version of the JAR file.
-
setVersion
-
getPart
- Returns:
- the part name, or null if not specified in the JNLP file.
-
isNative
public boolean isNative()- Returns:
- true if the JAR file contains native code libraries.
-
isEager
public boolean isEager()- Returns:
- true if the JAR file should be downloaded before starting the application.
-
isLazy
public boolean isLazy()- Returns:
- true if the JAR file should be downloaded on demand.
-
isMain
public boolean isMain()- Returns:
- true if the JNLP file defined this JAR as containing the main class. If no JARs were defined as the main JAR then the first JAR should be used to locate the main class.
- See Also:
-
isCacheable
public boolean isCacheable()Returns if this jar is cacheable- Returns:
- Whether or not this jar is cacheable
-