From the CallSite documentation
A CallSite is a holder for a variable MethodHandle, which is called its target. An invokedynamic instruction linked to a CallSite delegates all calls to the site's current target. A CallSite may be associated with several invokedynamic instructions, or it may be "free floating", associated with none. In any case, it may be invoked through an associated method handle called its dynamic invoker.
Questions:
Can the target within CallSite be changed? how? Please provide a code sample.
How can a CallSite be associated with multiple
invokedynamic
instructions?What is meant by "free-floating" CallSite? How can it be created?
EDIT: Note: I want to know the different ways to write code/lambda so that these 3 points occur in program.