Enum AbstractRegistry.InstantiationMode
- java.lang.Object
-
- java.lang.Enum<AbstractRegistry.InstantiationMode>
-
- de.aristaflow.adept2.base.registry.AbstractRegistry.InstantiationMode
-
- All Implemented Interfaces:
Serializable
,Comparable<AbstractRegistry.InstantiationMode>
- Enclosing class:
- AbstractRegistry
public static enum AbstractRegistry.InstantiationMode extends Enum<AbstractRegistry.InstantiationMode>
The instantiation modes an instance may have. This refers to a concrete instance (anonymous or named instance). Some components have fixed instantiation modes, for instance, registries are always singleton, execution environments are always multiple.- Author:
- Kevin Goeser
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractRegistry.InstantiationMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static AbstractRegistry.InstantiationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SINGLETON
public static final AbstractRegistry.InstantiationMode SINGLETON
Singleton mode.
-
MULTIPLE
public static final AbstractRegistry.InstantiationMode MULTIPLE
Multiple instantiation.
-
OFF
public static final AbstractRegistry.InstantiationMode OFF
No instantiation by the registry but by external components.
-
-
Method Detail
-
values
public static AbstractRegistry.InstantiationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AbstractRegistry.InstantiationMode c : AbstractRegistry.InstantiationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AbstractRegistry.InstantiationMode valueOf(String name)
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
-
-