public interface ClassInitializationPlugin extends GraphBuilderPlugin
ClassInitializationPlugin.supportsLazyInitialization(ConstantPool) and
ClassInitializationPlugin.loadReferencedType(GraphBuilderContext, ConstantPool, int, int).| Modifier and Type | Method and Description |
|---|---|
default boolean |
apply(GraphBuilderContext builder,
ResolvedJavaType type,
Supplier<FrameState> frameState)
Emits a class initialization barrier for
type. |
boolean |
apply(GraphBuilderContext builder,
ResolvedJavaType type,
Supplier<FrameState> frameState,
ValueNode[] classInit)
Emits a class initialization barrier for
type. |
void |
loadReferencedType(GraphBuilderContext builder,
ConstantPool cp,
int cpi,
int bytecode)
Ensures that the type referenced by the constant pool entry specified by
cp and
cpi is loaded. |
boolean |
supportsLazyInitialization(ConstantPool cp)
Determines if
cp has a variation of ConstantPool.loadReferencedType(int, int) that can
resolved a type without initializing it. |
boolean apply(GraphBuilderContext builder, ResolvedJavaType type, Supplier<FrameState> frameState, ValueNode[] classInit)
type.frameState - supplier to create a frame state representing the state just prior to
execution of the class initialization barrierclassInit - if non-null, the node representing the class initialization barrier should
be returned in element 0 of this arraytrue if this method emitted a barrier,false if notdefault boolean apply(GraphBuilderContext builder, ResolvedJavaType type, Supplier<FrameState> frameState)
type.frameState - supplier to create a frame state representing the state just prior to
execution of the class initialization barriertrue if this method emitted a barrier,false if notboolean supportsLazyInitialization(ConstantPool cp)
cp has a variation of ConstantPool.loadReferencedType(int, int) that can
resolved a type without initializing it.void loadReferencedType(GraphBuilderContext builder, ConstantPool cp, int cpi, int bytecode)
cp and
cpi is loaded. If cp does not support
lazy initialization, then the type is
initialized after resolution.cpi - the index of the constant pool entry that references the typebytecode - the opcode of the instruction that references the type