public class DefaultBootstrapper extends Object
DynamicLinkerFactory
, and its bootstrap methods will create MonomorphicCallSite
for
all call sites. It has two bootstrap methods: one creates call sites that use the
MethodHandles.publicLookup()
as the lookup for all call sites and disregard the one passed in as the caller,
and one that just uses the passed caller as the lookup scope. Using the public lookup one is advised if your language
runtime has no concept of interacting with Java visibility scopes, as it results in a more lightweight runtime
information.Modifier and Type | Method and Description |
---|---|
static CallSite |
bootstrap(MethodHandles.Lookup caller,
String name,
MethodType type)
Use this method as your bootstrap method (see the documentation of the java.lang.invoke package for how to do
this).
|
static CallSite |
publicBootstrap(MethodHandles.Lookup caller,
String name,
MethodType type)
Use this method as your bootstrap method (see the documentation of the java.lang.invoke package for how to do
this) when your language runtime doesn't have a concept of interaction with Java access scopes.
|
public static CallSite bootstrap(MethodHandles.Lookup caller, String name, MethodType type)
publicBootstrap(java.lang.invoke.MethodHandles.Lookup, String, MethodType)
instead.caller
- the caller's lookupname
- the name of the method at the call sitetype
- the method signature at the call siteMonomorphicCallSite
linked with the default dynamic linker.public static CallSite publicBootstrap(MethodHandles.Lookup caller, String name, MethodType type)
bootstrap(java.lang.invoke.MethodHandles.Lookup, String, MethodType)
insteadcaller
- the caller's lookup. It is ignored as the call sites will be created with
MethodHandles.publicLookup()
instead.name
- the name of the method at the call sitetype
- the method signature at the call siteMonomorphicCallSite
linked with the default dynamic linker.Copyright © 2019 Attila Szegedi. All rights reserved.