public enum LoadMode extends Enum<LoadMode>
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.
Enum Constant and Description |
---|
CURRENT_FIRST
tries to load from the current class loader first,
then (if not found) from the parent class loader.
|
PARENT_FIRST
tries to load from the parent class loader first,
then (if not found) from the current class loader.
|
Modifier and Type | Method and Description |
---|---|
static LoadMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LoadMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LoadMode PARENT_FIRST
public static final LoadMode CURRENT_FIRST
public static LoadMode[] values()
for (LoadMode c : LoadMode.values()) System.out.println(c);
public static LoadMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null