Package net.sourceforge.jnlp
Class ResourcesDesc
java.lang.Object
net.sourceforge.jnlp.ResourcesDesc
The resources element.
-
Constructor Summary
ConstructorsConstructorDescriptionResourcesDesc
(JNLPFile jnlpFile, Locale[] locales, String[] os, String[] arch) Create a representation of one information section of the JNLP File. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(Object resource) Add a resource.String[]
getArch()
JARDesc[]
getJARs()
JARDesc[]
JREDesc[]
getJREs()
Locale[]
static JARDesc
getMainJAR
(List<JARDesc> jars) static JARDesc
getMainJAR
(JARDesc[] jars) String[]
getOS()
getPackages
(String className) Returns the Packages that match the specified class name.<T> List
<T> getResources
(Class<T> type)
-
Constructor Details
-
ResourcesDesc
Create a representation of one information section of the JNLP File.- Parameters:
jnlpFile
- JNLP file the resources are forlocales
- the locales of these resourcesos
- the os of these resourcesarch
- the arch of these resources
-
-
Method Details
-
getJREs
- Returns:
- the JVMs.
-
getMainJAR
-
getMainJAR
-
getMainJAR
- Returns:
- the main JAR for these resources. There first JAR is returned if no JARs are specified as the main JAR, and if there are no JARs defined then null is returned.
-
getJARs
- Returns:
- all of the JARs.
-
getJARs
- Parameters:
partName
- the part name, null and "" equivalent- Returns:
- the JARs with the specified part name.
-
getExtensions
- Returns:
- the Extensions.
-
getPackages
- Returns:
- the Packages.
-
getPackages
Returns the Packages that match the specified class name.- Parameters:
className
- the fully qualified class name- Returns:
- the PackageDesc objects matching the class name
-
getProperties
- Returns:
- the Properties as a list.
-
getPropertiesMap
- Returns:
- the properties as a map.
-
getOS
- Returns:
- the os required by these resources, or null if no locale was specified in the JNLP file.
-
getArch
- Returns:
- the architecture required by these resources, or null if no locale was specified in the JNLP file.
-
getLocales
- Returns:
- the locale required by these resources, or null if no locale was specified in the JNLP file.
-
getJNLPFile
- Returns:
- the JNLPFile the resources are for.
-
getResources
- Type Parameters:
T
- type of resource to be found- Parameters:
type
- resource to be found- Returns:
- all resources of the specified type.
-
addResource
Add a resource.- Parameters:
resource
- to be added
-