Uses of Class
java.lang.invoke.CallSite
Package
Description
Classes and interfaces to represent nominal descriptors for run-time
entities such as classes or method handles, and classfile entities such as
constant pool entries or
invokedynamic
call sites.The
java.lang.invoke
package provides low-level primitives for interacting
with the Java Virtual Machine.The
java.lang.runtime
package provides low-level runtime support
for the Java language.-
Uses of CallSite in java.lang.constant
Modifier and TypeMethodDescriptionDynamicCallSiteDesc.resolveCallSiteDesc
(MethodHandles.Lookup lookup) Reflectively invokes the bootstrap method with the specified arguments, and return the resultingCallSite
-
Uses of CallSite in java.lang.invoke
Modifier and TypeClassDescriptionclass
AConstantCallSite
is aCallSite
whose target is permanent, and can never be changed.class
AMutableCallSite
is aCallSite
whose target variable behaves like an ordinary field.class
AVolatileCallSite
is aCallSite
whose target acts like a volatile variable.Modifier and TypeMethodDescriptionstatic CallSite
LambdaMetafactory.altMetafactory
(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, Object... args) Facilitates the creation of simple "function objects" that implement one or more interfaces by delegation to a providedMethodHandle
, after appropriate type adaptation and partial evaluation of arguments.static CallSite
StringConcatFactory.makeConcat
(MethodHandles.Lookup lookup, String name, MethodType concatType) Facilitates the creation of optimized String concatenation methods, that can be used to efficiently concatenate a known number of arguments of known types, possibly after type adaptation and partial evaluation of arguments.static CallSite
StringConcatFactory.makeConcatWithConstants
(MethodHandles.Lookup lookup, String name, MethodType concatType, String recipe, Object... constants) Facilitates the creation of optimized String concatenation methods, that can be used to efficiently concatenate a known number of arguments of known types, possibly after type adaptation and partial evaluation of arguments.static CallSite
LambdaMetafactory.metafactory
(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, MethodType interfaceMethodType, MethodHandle implementation, MethodType dynamicMethodType) Facilitates the creation of simple "function objects" that implement one or more interfaces by delegation to a providedMethodHandle
, after appropriate type adaptation and partial evaluation of arguments. -
Uses of CallSite in java.lang.runtime
Modifier and TypeMethodDescriptionstatic CallSite
SwitchBootstraps.enumSwitch
(MethodHandles.Lookup lookup, String invocationName, MethodType invocationType, Object... labels) Bootstrap method for linking aninvokedynamic
call site that implements aswitch
on a target of an enum type.static CallSite
SwitchBootstraps.typeSwitch
(MethodHandles.Lookup lookup, String invocationName, MethodType invocationType, Object... labels) Bootstrap method for linking aninvokedynamic
call site that implements aswitch
on a target of a reference type.