Interface InvokeDynamicDesugarizer

All Known Implementing Classes:
RecordMethodsDesugarizer, StringConcatDesugarizer

public interface InvokeDynamicDesugarizer
Lowers one kind of invokedynamic (identified by its bootstrap method) to equivalent plain Jimple, which InvokeDynamicDesugarer puts in place of the invokedynamic statement.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    applies(@NonNull JDynamicInvokeExpr expr)
    Whether this desugarizer handles expr.
    static boolean
    bootstrappedBy(@NonNull JDynamicInvokeExpr expr, @NonNull String className)
    Whether expr's bootstrap method is declared by className.
    boolean
    desugar(@NonNull JDynamicInvokeExpr expr, @Nullable LValue result, @NonNull Fragment code)
    Emits code into code that does what expr does and stores its value into result.
  • Method Details

    • applies

      boolean applies(@NonNull JDynamicInvokeExpr expr)
      Whether this desugarizer handles expr.
    • desugar

      boolean desugar(@NonNull JDynamicInvokeExpr expr, @Nullable LValue result, @NonNull Fragment code)
      Emits code into code that does what expr does and stores its value into result.
      Parameters:
      result - where the invokedynamic's value goes, null if it is discarded
      Returns:
      whether expr could be lowered; if not, the invokedynamic stays
    • bootstrappedBy

      static boolean bootstrappedBy(@NonNull JDynamicInvokeExpr expr, @NonNull String className)
      Whether expr's bootstrap method is declared by className.