Class StringConcatDesugarizer
java.lang.Object
sootup.interceptors.invokedynamic.StringConcatDesugarizer
- All Implemented Interfaces:
InvokeDynamicDesugarizer
StringConcatFactory.makeConcat[WithConstants] lowered to a StringBuilder chain,
as javac 8 compiles string concatenation. Arguments are rendered as String.valueOf does,
by their static type (see StringBuilding).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(@NonNull JDynamicInvokeExpr expr) Whether this desugarizer handlesexpr.booleandesugar(@NonNull JDynamicInvokeExpr expr, @Nullable LValue result, @NonNull Fragment code) Emits code intocodethat does whatexprdoes and stores its value intoresult.
-
Constructor Details
-
StringConcatDesugarizer
public StringConcatDesugarizer()
-
-
Method Details
-
applies
Description copied from interface:InvokeDynamicDesugarizerWhether this desugarizer handlesexpr.- Specified by:
appliesin interfaceInvokeDynamicDesugarizer
-
desugar
public boolean desugar(@NonNull JDynamicInvokeExpr expr, @Nullable LValue result, @NonNull Fragment code) Description copied from interface:InvokeDynamicDesugarizerEmits code intocodethat does whatexprdoes and stores its value intoresult.- Specified by:
desugarin interfaceInvokeDynamicDesugarizerresult- where the invokedynamic's value goes,nullif it is discarded- Returns:
- whether
exprcould be lowered; if not, the invokedynamic stays
-