Class BootstrapMethodInfo


  • public class BootstrapMethodInfo
    extends Object
    Represents bootstrap method information for invokedynamic and constant dynamic.
    • Constructor Detail

      • BootstrapMethodInfo

        public BootstrapMethodInfo​(MethodHandleConstant bootstrapMethod,
                                   List<Constant> bootstrapArguments)
        Creates a bootstrap method info.
        Parameters:
        bootstrapMethod - the bootstrap method handle
        bootstrapArguments - the static arguments to the bootstrap method
    • Method Detail

      • getBootstrapMethod

        public MethodHandleConstant getBootstrapMethod()
        Returns:
        the bootstrap method
      • getBootstrapArguments

        public List<Constant> getBootstrapArguments()
        Returns:
        the bootstrap arguments
      • isLambdaMetafactory

        public boolean isLambdaMetafactory()
        Checks if this is a lambda metafactory bootstrap.
        Returns:
        true if this uses LambdaMetafactory
      • isStringConcatFactory

        public boolean isStringConcatFactory()
        Checks if this is a string concatenation bootstrap.
        Returns:
        true if this uses StringConcatFactory
      • isObjectMethodsBootstrap

        public boolean isObjectMethodsBootstrap()
        Checks if this is the records ObjectMethods bootstrap (Java 16) backing the auto-generated equals/hashCode/toString of a record.
        Returns:
        true if this uses java.lang.runtime.ObjectMethods
      • isSwitchBootstrap

        public boolean isSwitchBootstrap()
        Checks if this is a SwitchBootstraps bootstrap (Java 21 pattern switch): typeSwitch or enumSwitch.
        Returns:
        true if this uses java.lang.runtime.SwitchBootstraps
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object