public class ApplicationEnvironment extends Object
This class uses the fraction-manifest.yaml from each fraction,
along with the container-wide wildfly-swarm-manifest.yaml if executing
in an uberjar mode in order to determine information such as:
| Modifier and Type | Class and Description |
|---|---|
static class |
ApplicationEnvironment.Mode |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_MAIN_CLASS_NAME |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
bootstrapArtifacts()
List of bootstrap artifacts to look for fractions.
|
List<ArtifactCoordinates> |
bootstrapArtifactsAsCoordinates() |
List<String> |
bootstrapModules()
List of bootstrap modules to bootstrap the fractions.
|
List<FractionManifest> |
fractionManifests()
Retrieve a sorted list of installed fraction manifests.
|
static ApplicationEnvironment |
get()
Fetch the ApplicationEnvironment
|
String |
getAsset() |
ClassLoader |
getBootstrapClassLoader() |
Set<String> |
getDependencies()
List of application-level dependencies.
|
String |
getMainClassName()
Retrieve the user's main-class name, if specified, else the default.
|
ApplicationEnvironment.Mode |
getMode() |
List<String> |
getRemovableDependencies()
List of removable dependencies, such as the
bootstrap Swarm jars and anything transitive not directly
required by the application.
|
boolean |
isHollow()
Determine if this application is defined to be hollow.
|
Set<String> |
resolveDependencies(List<String> exclusions)
[hb] TODO: these javadocs are wrong and describe a previous implementation of this method
Resolve the application's dependencies.
|
public static final String DEFAULT_MAIN_CLASS_NAME
public static ApplicationEnvironment get()
public List<String> bootstrapModules()
public List<String> bootstrapArtifacts()
public List<ArtifactCoordinates> bootstrapArtifactsAsCoordinates()
public ApplicationEnvironment.Mode getMode()
public Set<String> getDependencies()
Only applicable for uberjar executions.
public List<String> getRemovableDependencies()
public Set<String> resolveDependencies(List<String> exclusions) throws IOException
Using combinations of getDependencies()} and getRemovableDependencies(),
depending on execution mode, resolves application dependencies, taking
into account any exclusions.
exclusions - Maven GAVs to exclude.IOExceptionpublic String getAsset()
public String getMainClassName()
public boolean isHollow()
true if hollow, otherwise false.public ClassLoader getBootstrapClassLoader() throws org.jboss.modules.ModuleLoadException
org.jboss.modules.ModuleLoadExceptionpublic List<FractionManifest> fractionManifests()
Copyright © 2018 JBoss by Red Hat. All rights reserved.