Package org.aksw.commons.beans.model
Enum Class MethodHandleLookup
- All Implemented Interfaces:
Serializable,Comparable<MethodHandleLookup>,Constable
Copy/paste from https://github.com/spring-projects/spring-data-commons/blob/2.1.8.RELEASE/src/main/java/org/springframework/data/projection/DefaultMethodInvokingMethodInterceptor.java
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEncapsulatedMethodHandlelookup working on Java 9.FallbackMethodHandlelookup usingpublic lookup.Open (via reflection construction ofMethodHandles.Lookup) method handle lookup. -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodHandleLookupObtain the first availableMethodHandleLookup.abstract booleanabstract MethodHandleLookup aMethodHandlegivenMethodto look up.static MethodHandleLookupReturns the enum constant of this class with the specified name.static MethodHandleLookup[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENCAPSULATED
EncapsulatedMethodHandlelookup working on Java 9. -
OPEN
Open (via reflection construction ofMethodHandles.Lookup) method handle lookup. Works with Java 8 and with Java 9 permitting illegal access. -
FALLBACK
FallbackMethodHandlelookup usingpublic lookup.- Since:
- 2.1
-
-
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
-
lookup
Lookup aMethodHandlegivenMethodto look up.- Parameters:
method- must not be null.- Returns:
- the method handle.
- Throws:
ReflectiveOperationException
-
isAvailable
public abstract boolean isAvailable()- Returns:
- true if the lookup is available.
-
getMethodHandleLookup
Obtain the first availableMethodHandleLookup.- Returns:
- the
MethodHandleLookup - Throws:
IllegalStateException- if noMethodHandleLookupis available.
-