Bootstrapper

Class

The bootstrapper handles resolving call-sites for dynamic method calls. This is used by functions in conjunction with the meta-factory.

Methods in this are used by name from dynamic invocation.

This is an adapted copy of Krow's bootstrapper.

Extends

Object

Modifiers

public final

// Randomly-generated example
Bootstrapper.bootstrap(caller, name, type, owner);
Bootstrapper.bootstrapFunction(caller, name, type, source, owner, args);
Bootstrapper.bootstrapPrivateDynamic(caller, name, type, owner);
Bootstrapper.bootstrapPrivate(caller, name, type, owner);

Constructors


new Bootstrapper ()

Constructor
No description is available for this element.
Return Type

Bootstrapper

Modifiers

public


Methods


bootstrap (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a regular static method.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapFunction (Lookup, String, MethodType, String, Class, String)

Method

This writes the call-site for invoking a Skript function from a script.

The metafactory is invoked to create a new bridge stub.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Stringsource
5Classowner
6Stringargs
Return Type

CallSite

Modifiers

public static

bootstrapPrivateDynamic (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a private dynamic method.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapPrivate (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a private static method.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapDynamic (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a regular dynamic method.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

getBootstrapFunction ()

Method

Gets the handle for a Skript function.

Return Type

Handle

Modifiers

public static

getBootstrap (boolean, boolean)

Method

Gets the handle for a regular method, used for writing a dynamic call-site.

IndexTypeName
1booleanisDynamic
2booleanisPrivate
Return Type

Handle

Modifiers

public static

bootstrapStaticFieldSetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapStaticFieldGetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapPrivateStaticFieldSetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapPrivateStaticFieldGetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapFieldSetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapFieldGetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapPrivateFieldSetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static

bootstrapPrivateFieldGetter (Lookup, String, MethodType, Class)

Method

Finds an existing call-site for a static field.

Rather than using the variable handle, this returns a method call-site. This allows the field to be treated like a method by the compiler.

IndexTypeName
1Lookupcaller
2Stringname
3MethodTypetype
4Classowner
Return Type

CallSite

Modifiers

public static