Class ByteBufferJava9ApiPlugin
java.lang.Object
org.robovm.compiler.plugin.Plugin
org.robovm.compiler.plugin.CompilerPlugin
org.robovm.compiler.plugin.AbstractCompilerPlugin
org.robovm.compiler.plugin.desugar.ByteBufferJava9ApiPlugin
public class ByteBufferJava9ApiPlugin extends AbstractCompilerPlugin
This plugin adds support for Java 9+ covariant returns type methods in
java.nio.ByteBuffer.
It adds following covariant return type (ByteBuffer) alternatives to Java8 apis:
ByteBuffer position(int newPosition)
ByteBuffer limit(int newLimit)
ByteBuffer flip()
ByteBuffer clear()
ByteBuffer mark()
ByteBuffer reset()
ByteBuffer rewind()
Implementation calls super and returns this (instance of ByteBuffer)
plugin argument to control: 'desugar:enableJdk9ByteBufferApi=false'- Author:
- DKimitsa
-
Constructor Summary
Constructors Constructor Description ByteBufferJava9ApiPlugin() -
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
-
ByteBufferJava9ApiPlugin
public ByteBufferJava9ApiPlugin()
-
-
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
-