Interface Bootstraps


  • public interface Bootstraps
    An object that provides utility methods about the lambda bootstraps contained in a class.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.bcel.classfile.BootstrapMethod getBootstrapFor​(org.apache.bcel.generic.INVOKEDYNAMIC invokedynamic)
      Yields the bootstrap method associated with the given instruction.
      Stream<org.apache.bcel.classfile.BootstrapMethod> getBootstraps()
      Yields the bootstrap methods in this class.
      Stream<org.apache.bcel.classfile.BootstrapMethod> getBootstrapsLeadingToEntries()
      Yields the subset of the bootstrap methods of this class that lead to an entry, possibly indirectly.
      Optional<? extends Executable> getTargetOf​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
      Yields the target method or constructor called by the given bootstrap.
      boolean isPartOfFromContract​(org.apache.bcel.generic.MethodGen lambda)
      Determines if the given lambda method is a part of an @@Entry method, that the compiler moved into a synthetic method implementing the code of a lambda expression.
      boolean lambdaIsEntry​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
      Determines if the given bootstrap method is a method reference to an entry.
      boolean lambdaIsRedPayable​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
      Determines if the given bootstrap method is a method reference to a red payable method or constructor.
    • Method Detail

      • lambdaIsEntry

        boolean lambdaIsEntry​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
        Determines if the given bootstrap method is a method reference to an entry.
        Parameters:
        bootstrap - the bootstrap method
        Returns:
        true if and only if that condition holds
      • lambdaIsRedPayable

        boolean lambdaIsRedPayable​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
        Determines if the given bootstrap method is a method reference to a red payable method or constructor.
        Parameters:
        bootstrap - the bootstrap method
        Returns:
        true if and only if that condition holds
      • getBootstraps

        Stream<org.apache.bcel.classfile.BootstrapMethod> getBootstraps()
        Yields the bootstrap methods in this class.
        Returns:
        the bootstrap methods
      • getBootstrapsLeadingToEntries

        Stream<org.apache.bcel.classfile.BootstrapMethod> getBootstrapsLeadingToEntries()
        Yields the subset of the bootstrap methods of this class that lead to an entry, possibly indirectly.
        Returns:
        the bootstrap methods that lead to an entry
      • getBootstrapFor

        org.apache.bcel.classfile.BootstrapMethod getBootstrapFor​(org.apache.bcel.generic.INVOKEDYNAMIC invokedynamic)
        Yields the bootstrap method associated with the given instruction.
        Parameters:
        invokedynamic - the instruction
        Returns:
        the bootstrap method
      • getTargetOf

        Optional<? extends Executable> getTargetOf​(org.apache.bcel.classfile.BootstrapMethod bootstrap)
        Yields the target method or constructor called by the given bootstrap. It can also be outside the class that we are processing.
        Parameters:
        bootstrap - the bootstrap
        Returns:
        the target called method or constructor
      • isPartOfFromContract

        boolean isPartOfFromContract​(org.apache.bcel.generic.MethodGen lambda)
        Determines if the given lambda method is a part of an @@Entry method, that the compiler moved into a synthetic method implementing the code of a lambda expression. As such, it can be considered as part of the @@Entry method itself.
        Parameters:
        lambda - the lambda method
        Returns:
        true if and only if that condition holds