Class StringConcatRewriterPlugin
java.lang.Object
org.robovm.compiler.plugin.Plugin
org.robovm.compiler.plugin.CompilerPlugin
org.robovm.compiler.plugin.AbstractCompilerPlugin
org.robovm.compiler.plugin.desugar.StringConcatRewriterPlugin
public class StringConcatRewriterPlugin extends AbstractCompilerPlugin
This plugin adds support for Java 9+ String concatenation by replacing dynamicInvoke instructions
to
java.lang.invoke.StringConcatFactory with StringBuilder appends.
plugin argument to control: 'desugar:enableJava9StringConcat=false'- Author:
- CoderBaron
-
Constructor Summary
Constructors Constructor Description StringConcatRewriterPlugin() -
Method Summary
Modifier and Type Method Description voidbeforeClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder)Called just before a class is about to be compiled.voidbeforeConfig(Config.Builder builder, Config config)Called before theConfigfor a compilation is built.PluginArgumentsgetArguments()Returns the plugin's prefix arguments to be parsed from XML or the command lineMethods inherited from class org.robovm.compiler.plugin.AbstractCompilerPlugin
afterClass, afterClassDependenciesResolved, afterLinker, afterMethod, afterObjectFile, beforeLinker, beforeMethod, helloClassMethods inherited from class org.robovm.compiler.plugin.Plugin
argumentValue, argumentValue, argumentValue, parseArguments
-
Constructor Details
-
StringConcatRewriterPlugin
public StringConcatRewriterPlugin()
-
-
Method Details
-
getArguments
Description copied from class:PluginReturns the plugin's prefix arguments to be parsed from XML or the command line- Overrides:
getArgumentsin classAbstractCompilerPlugin
-
beforeConfig
Description copied from class:CompilerPluginCalled before theConfigfor a compilation is built. Allows the plugin to modify the compiler configuration. NOTE: Some properties of the passedConfigmay not have been set at the time of the call to this method.- Overrides:
beforeConfigin classAbstractCompilerPlugin- Parameters:
builder- theConfig.Builderconfig- the not yet builtConfig. Can be used to get configuration set on theConfig.Builderso far.- Throws:
IOException
-
beforeClass
public void beforeClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder) throws IOExceptionDescription copied from class:CompilerPluginCalled just before a class is about to be compiled. Modifications to the underlyingSootClass(Clazz.getSootClass()) should be done at this stage.- Overrides:
beforeClassin classAbstractCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.moduleBuilder- theModuleBuilderholding the generated bitcode.- Throws:
IOException
-