Package ch.grengine.load
Enum Class LoadMode
- All Implemented Interfaces:
Serializable,Comparable<LoadMode>,Constable
Mode for loading classes.
The traditional way to load classes in the Java VM is "parent first", while "current first" is a newer approach to load classes, which, for example, servlet containers or similar applications use in some cases. Both approaches have advantages and disadvantages.
The "parent first" approach is maybe often better in more static situations, while "current first" is maybe often better in more dynamic situations, like maybe also often with dynamically compiled Groovy scripts.
- Since:
- 1.0
- Author:
- Alain Stalder, Made in Switzerland.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptiontries to load from the current class loader first, then (if not found) from the parent class loader.tries to load from the parent class loader first, then (if not found) from the current class loader. -
Method Summary
-
Enum Constant Details
-
PARENT_FIRST
tries to load from the parent class loader first, then (if not found) from the current class loader.- Since:
- 1.0
-
CURRENT_FIRST
tries to load from the current class loader first, then (if not found) from the parent class loader.- Since:
- 1.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-