public static interface ModuleSpec.Builder
Modifier and Type | Method | Description |
---|---|---|
ModuleSpec.Builder |
addDependency(DependencySpec dependencySpec) |
Add a dependency specification.
|
ModuleSpec.Builder |
addProperty(String name,
String value) |
Add a property to this module specification.
|
ModuleSpec.Builder |
addProvide(String serviceTypeName,
String serviceImplClassName) |
Declare that this module provides a service with the given type name with the implementation class with
the given class name.
|
ModuleSpec.Builder |
addResourceRoot(ResourceLoaderSpec resourceLoader) |
Add a local resource root, from which this module will load class definitions and resources.
|
ModuleSpec |
create() |
Create the module specification from this builder.
|
default ModuleIdentifier |
getIdentifier() |
Deprecated.
use
getName() instead |
String |
getName() |
Get the name of the module being defined by this builder.
|
Version |
getVersion() |
Get the version for this module specification, or
null if none was set. |
ModuleSpec.Builder |
setAssertionSetting(AssertionSetting assertionSetting) |
Set the default assertion setting for this module.
|
ModuleSpec.Builder |
setClassFileTransformer(ClassFileTransformer classFileTransformer) |
Deprecated.
Use
setClassFileTransformer(ClassTransformer) instead. |
ModuleSpec.Builder |
setClassFileTransformer(ClassTransformer transformer) |
Set the class file transformer function to use for this module.
|
ModuleSpec.Builder |
setFallbackLoader(LocalLoader fallbackLoader) |
Sets a "fall-back" loader that will attempt to load a class if all other mechanisms
are unsuccessful.
|
ModuleSpec.Builder |
setMainClass(String mainClass) |
Set the main class for this module, or
null for none. |
ModuleSpec.Builder |
setModuleClassLoaderFactory(ModuleClassLoaderFactory moduleClassLoaderFactory) |
Set the module class loader factory to use to create the module class loader for this module.
|
ModuleSpec.Builder |
setPermissionCollection(PermissionCollection permissionCollection) |
Set the permission collection for this module specification.
|
ModuleSpec.Builder |
setVersion(Version version) |
Set the version for this module specification, or
null to set no version for this module. |
ModuleSpec.Builder setMainClass(String mainClass)
null
for none.mainClass
- the main class nameModuleSpec.Builder setAssertionSetting(AssertionSetting assertionSetting)
assertionSetting
- the assertion settingModuleSpec.Builder addDependency(DependencySpec dependencySpec)
dependencySpec
- the dependency specificationModuleSpec.Builder addResourceRoot(ResourceLoaderSpec resourceLoader)
resourceLoader
- the resource loader for the rootModuleSpec create()
@Deprecated default ModuleIdentifier getIdentifier()
getName()
insteadString getName()
ModuleSpec.Builder setFallbackLoader(LocalLoader fallbackLoader)
fallbackLoader
- the fall-back loaderModuleSpec.Builder setModuleClassLoaderFactory(ModuleClassLoaderFactory moduleClassLoaderFactory)
moduleClassLoaderFactory
- the factory@Deprecated ModuleSpec.Builder setClassFileTransformer(ClassFileTransformer classFileTransformer)
setClassFileTransformer(ClassTransformer)
instead.classFileTransformer
- the class file transformerModuleSpec.Builder setClassFileTransformer(ClassTransformer transformer)
null
then no transformation will take place. The function may accept and return a direct or heap byte buffer.transformer
- the class file transformer (must not be null
)ModuleSpec.Builder addProperty(String name, String value)
name
- the property namevalue
- the property valueModuleSpec.Builder setPermissionCollection(PermissionCollection permissionCollection)
AllPermission
is assumed.permissionCollection
- the permission collectionModuleSpec.Builder setVersion(Version version)
null
to set no version for this module.version
- the module versionModuleSpec.Builder addProvide(String serviceTypeName, String serviceImplClassName)
serviceTypeName
- the service type name (must not be null
)serviceImplClassName
- the service implementation class name (must not be null
)Version getVersion()
null
if none was set.null
if none was setCopyright © 2018 JBoss by Red Hat. All rights reserved.