java.lang.Object
org.glavo.classfile.impl.ModuleAttributeBuilderImpl
- All Implemented Interfaces:
ModuleAttribute.ModuleAttributeBuilder
public final class ModuleAttributeBuilderImpl
extends Object
implements ModuleAttribute.ModuleAttributeBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionModuleAttributeBuilderImpl(ModuleDesc moduleName) ModuleAttributeBuilderImpl(ModuleEntry moduleName) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds module attribute.exports(ModuleExportInfo exports) Adds exported packageexports(PackageDesc pkge, int flags, ModuleDesc... exportsToModules) Adds exported packagemoduleFlags(int flags) Sets the module flagsmoduleName(ModuleDesc moduleName) Sets the module namemoduleVersion(String version) Sets the module versionopens(ModuleOpenInfo opens) Opens packageopens(PackageDesc pkge, int flags, ModuleDesc... opensToModules) Opens packageDeclares provision of a serviceprovides(ModuleProvideInfo provides) Declares provision of a servicerequires(ModuleRequireInfo requires) Adds module requirementrequires(ModuleDesc module, int flags, String version) Adds module requirementDeclares use of a serviceuses(ClassEntry uses) Declares use of a serviceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glavo.classfile.attribute.ModuleAttribute.ModuleAttributeBuilder
exports, moduleFlags, opens, requires
-
Constructor Details
-
ModuleAttributeBuilderImpl
-
ModuleAttributeBuilderImpl
-
-
Method Details
-
build
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderBuilds module attribute.- Specified by:
buildin interfaceModuleAttribute.ModuleAttributeBuilder- Returns:
- the module attribute
-
moduleName
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderSets the module name- Specified by:
moduleNamein interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
moduleName- the module name- Returns:
- this builder
-
moduleFlags
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderSets the module flags- Specified by:
moduleFlagsin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
flags- the module flags- Returns:
- this builder
-
moduleVersion
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderSets the module version- Specified by:
moduleVersionin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
version- the module version- Returns:
- this builder
-
requires
public ModuleAttribute.ModuleAttributeBuilder requires(ModuleDesc module, int flags, String version) Description copied from interface:ModuleAttribute.ModuleAttributeBuilderAdds module requirement- Specified by:
requiresin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
module- the required moduleflags- the requires flagsversion- the required module version- Returns:
- this builder
-
requires
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderAdds module requirement- Specified by:
requiresin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
requires- the module require info- Returns:
- this builder
-
exports
public ModuleAttribute.ModuleAttributeBuilder exports(PackageDesc pkge, int flags, ModuleDesc... exportsToModules) Description copied from interface:ModuleAttribute.ModuleAttributeBuilderAdds exported package- Specified by:
exportsin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
pkge- the exported packageflags- the export flagsexportsToModules- the modules to export to- Returns:
- this builder
-
exports
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderAdds exported package- Specified by:
exportsin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
exports- the module export info- Returns:
- this builder
-
opens
public ModuleAttribute.ModuleAttributeBuilder opens(PackageDesc pkge, int flags, ModuleDesc... opensToModules) Description copied from interface:ModuleAttribute.ModuleAttributeBuilderOpens package- Specified by:
opensin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
pkge- the opened packageflags- the open package flagsopensToModules- the modules to open to- Returns:
- this builder
-
opens
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderOpens package- Specified by:
opensin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
opens- the module open info- Returns:
- this builder
-
uses
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderDeclares use of a service- Specified by:
usesin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
service- the service class used- Returns:
- this builder
-
uses
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderDeclares use of a service- Specified by:
usesin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
uses- the service class used- Returns:
- this builder
-
provides
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderDeclares provision of a service- Specified by:
providesin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
service- the service class providedimplClasses- the implementation classes- Returns:
- this builder
-
provides
Description copied from interface:ModuleAttribute.ModuleAttributeBuilderDeclares provision of a service- Specified by:
providesin interfaceModuleAttribute.ModuleAttributeBuilder- Parameters:
provides- the module provides info- Returns:
- this builder
-