public class ModuleUtils
extends java.lang.Object
Constructor and Description |
---|
ModuleUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.ClassLoader |
createModuleDiscoveryClassLoader(org.springframework.core.io.Resource moduleLocation,
java.lang.ClassLoader parent)
Create a "simple" ClassLoader for a module, suitable for early discovery phase, before module options are known.
|
static java.lang.ClassLoader |
createModuleRuntimeClassLoader(SimpleModuleDefinition definition,
ModuleOptions moduleOptions,
java.lang.ClassLoader parent)
Create a ClassLoader suitable for running a module.
|
static java.util.Properties |
loadModuleProperties(SimpleModuleDefinition moduleDefinition)
Locate the module '.properties' file and load it as a
Properties object. |
static org.springframework.core.io.Resource |
locateModuleResource(SimpleModuleDefinition definition,
java.lang.String extension)
Return an expected module resource given a file extension.
|
static org.springframework.core.io.Resource |
modulePropertiesFile(SimpleModuleDefinition definition)
Return a resource that can be used to load the module '.properties' file (containing e.g. information
about module options, or null if no such file exists.
|
static org.springframework.core.io.Resource |
resourceBasedConfigurationFile(SimpleModuleDefinition moduleDefinition)
Return the resource that can be used to configure a module, or null if no such resource exists.
|
public static java.lang.ClassLoader createModuleRuntimeClassLoader(SimpleModuleDefinition definition, ModuleOptions moduleOptions, java.lang.ClassLoader parent)
public static java.lang.ClassLoader createModuleDiscoveryClassLoader(org.springframework.core.io.Resource moduleLocation, java.lang.ClassLoader parent)
public static org.springframework.core.io.Resource modulePropertiesFile(SimpleModuleDefinition definition)
public static java.util.Properties loadModuleProperties(SimpleModuleDefinition moduleDefinition)
Properties
object.null
if no properties file existspublic static org.springframework.core.io.Resource locateModuleResource(SimpleModuleDefinition definition, java.lang.String extension)
public static org.springframework.core.io.Resource resourceBasedConfigurationFile(SimpleModuleDefinition moduleDefinition)
java.lang.IllegalStateException
- if both a .xml and .groovy file are present