Enum ExtensionScope
- All Implemented Interfaces:
Serializable,Comparable<ExtensionScope>,java.lang.constant.Constable
Extension SPI Scope
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe extension instance is used within one application, shared with all modules of the application, and different applications create different extension instances.The extension instance is used within framework, shared with all applications and modules.The extension instance is used within one module, and different modules create different extension instances.self-sufficient, creates an instance for per scope, for special SPI extension, likeExtensionInjector -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionScopeReturns the enum constant of this type with the specified name.static ExtensionScope[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
FRAMEWORK
The extension instance is used within framework, shared with all applications and modules.Framework scope SPI extension can only obtain
Consideration:FrameworkModel, cannot get theApplicationModelandModuleModel.- Some SPI need share data between applications inside framework
- Stateless SPI is safe shared inside framework
-
APPLICATION
The extension instance is used within one application, shared with all modules of the application, and different applications create different extension instances.Application scope SPI extension can obtain
Consideration:FrameworkModelandApplicationModel, cannot get theModuleModel.- Isolate extension data in different applications inside framework
- Share extension data between all modules inside application
-
MODULE
The extension instance is used within one module, and different modules create different extension instances.Module scope SPI extension can obtain
Consideration:FrameworkModel,ApplicationModelandModuleModel.- Isolate extension data in different modules inside application
-
SELF
self-sufficient, creates an instance for per scope, for special SPI extension, likeExtensionInjector
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-