Enum Class LambdaStrategy
- All Implemented Interfaces:
Serializable, Comparable<LambdaStrategy>, Constable
Possible lambda generation strategies.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe anonymous class lambda generation strategy.The classic lambda generation strategy.The default optimized lambda generation strategy. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<LambdaStrategy> The list of possible values for this type. -
Method Summary
Modifier and TypeMethodDescriptionstatic LambdaStrategyReturns the enum constant of this class with the specified name.static LambdaStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPTIMIZED
The default optimized lambda generation strategy. A hidden class is generated which implements the lambda type. -
CLASSIC
The classic lambda generation strategy. The JDK lambda metafactory is used to create a SAM implementation/method handle pair. -
ANONYMOUS_CLASS
The anonymous class lambda generation strategy. The lambda body is generated as an anonymous class which is loaded by the host class loader.
-
-
Field Details
-
values
The list of possible values for this type.
-
-
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
-