Package org.jboss.modules
Class LayeredModulePathFactory
- java.lang.Object
-
- org.jboss.modules.LayeredModulePathFactory
-
class LayeredModulePathFactory extends java.lang.Object
Provides a module path that includes entries for any "layer" and "add-on" directory structures found within the regular items in the provided module path.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LayeredModulePathFactory.LayersConfig
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
OVERLAYS
-
Constructor Summary
Constructors Constructor Description LayeredModulePathFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static LayeredModulePathFactory.LayersConfig
getLayersConfig(java.io.File repoRoot)
(package private) static void
loadOverlays(java.io.File layeringRoot, java.util.List<java.io.File> path)
Load the overlays for each layer.(package private) static boolean
readLine(java.io.InputStream is, java.lang.StringBuffer buffer)
static java.util.List<java.lang.String>
readRefs(java.io.File file)
(package private) static java.util.List<java.lang.String>
readRefs(java.io.InputStream is)
(package private) static java.io.File[]
resolveLayeredModulePath(java.io.File... modulePath)
Inspects each element in the givenmodulePath
to see if it includes alayers.conf
file and/or a standard directory structure with child directoriessystem/layers
and, optionally,system/add-ons
.
-
-
-
Field Detail
-
OVERLAYS
private static final java.lang.String OVERLAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveLayeredModulePath
static java.io.File[] resolveLayeredModulePath(java.io.File... modulePath)
Inspects each element in the givenmodulePath
to see if it includes alayers.conf
file and/or a standard directory structure with child directoriessystem/layers
and, optionally,system/add-ons
. If so, the layers identified inlayers.conf
are added to the module path- Parameters:
modulePath
- the filesystem locations that make up the standard module path, each of which is to be checked for the presence of layers and add-ons- Returns:
- a new module path, including any layers and add-ons, if found
-
getLayersConfig
private static LayeredModulePathFactory.LayersConfig getLayersConfig(java.io.File repoRoot)
-
loadOverlays
static void loadOverlays(java.io.File layeringRoot, java.util.List<java.io.File> path)
Load the overlays for each layer.- Parameters:
layeringRoot
- the layer rootpath
- the module path
-
readRefs
public static java.util.List<java.lang.String> readRefs(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
readRefs
static java.util.List<java.lang.String> readRefs(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
readLine
static boolean readLine(java.io.InputStream is, java.lang.StringBuffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
-