Package sootup.interceptors
Class InvokeDynamicDesugarer
java.lang.Object
sootup.interceptors.InvokeDynamicDesugarer
- All Implemented Interfaces:
BodyInterceptor
Replaces invokedynamic statements by equivalent plain Jimple, one
InvokeDynamicDesugarizer per kind of bootstrap - by default string concatenation and record
methods. Not part of the default interceptors: the body then no longer mirrors the bytecode.
Lambdas stay invokedynamics (they would need synthetic classes).-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInvokeDynamicDesugarer(@NonNull Collection<InvokeDynamicDesugarizer> desugarizers) -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(@NonNull Collection<Stmt> stmts) WhetherinterceptBody(sootup.core.model.Body.BodyBuilder, sootup.core.views.View)would change a body with these statements.voidinterceptBody(@NonNull Body.BodyBuilder builder, @NonNull View view) Takes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.
-
Field Details
-
DEFAULT_DESUGARIZERS
-
-
Constructor Details
-
InvokeDynamicDesugarer
public InvokeDynamicDesugarer() -
InvokeDynamicDesugarer
-
-
Method Details
-
appliesTo
WhetherinterceptBody(sootup.core.model.Body.BodyBuilder, sootup.core.views.View)would change a body with these statements. -
interceptBody
Description copied from interface:BodyInterceptorTakes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.- Specified by:
interceptBodyin interfaceBodyInterceptor
-