Package org.robovm.compiler.plugin
Class AbstractCompilerPlugin
java.lang.Object
org.robovm.compiler.plugin.Plugin
org.robovm.compiler.plugin.CompilerPlugin
org.robovm.compiler.plugin.AbstractCompilerPlugin
- Direct Known Subclasses:
AnnotationImplPlugin,BuildGarbageCollectorPlugin,ByteBufferJava9ApiPlugin,DebugInformationPlugin,InterfaceBuilderClassesPlugin,LambdaPlugin,ObjCBlockPlugin,ObjCMemberPlugin,ObjCProtocolProxyPlugin,ObjCProtocolToObjCObjectPlugin,StringConcatRewriterPlugin
public abstract class AbstractCompilerPlugin extends CompilerPlugin
Abstract implementation for
CompilerPlugin with empty implementations
for all methods.-
Constructor Summary
Constructors Constructor Description AbstractCompilerPlugin() -
Method Summary
Modifier and Type Method Description voidafterClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder)Called after a class has been compiled to LLVM bitcode but before it is converted into machine code.voidafterClassDependenciesResolved(Config config, Clazz clazz)Called after dependencies resolved and added to the list.voidafterLinker(Config config, File executable)Called just beforeLinkeris invoked.voidafterMethod(Config config, Clazz clazz, soot.SootMethod method, ModuleBuilder moduleBuilder, Function function)Called after a method has been compiled to LLVM bitcode but before it is converted into machine code.voidafterObjectFile(Config config, Clazz clazz, File objectFile, ObjectFile objectFileData)Called after the object file of a class has been compiled to an object file.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.voidbeforeLinker(Config config, Linker linker, Set<Clazz> classes)Called just beforeLinkeris invoked.voidbeforeMethod(Config config, Clazz clazz, soot.SootMethod method, ModuleBuilder moduleBuilder)Called just before a method is about to be compiled.PluginArgumentsgetArguments()Returns the plugin's prefix arguments to be parsed from XML or the command linevoidhelloClass(Config config, Clazz clazz)Called just before a class is about to be compiled.Methods inherited from class org.robovm.compiler.plugin.Plugin
argumentValue, argumentValue, argumentValue, parseArguments
-
Constructor Details
-
AbstractCompilerPlugin
public AbstractCompilerPlugin()
-
-
Method Details
-
getArguments
Description copied from class:PluginReturns the plugin's prefix arguments to be parsed from XML or the command line- Specified by:
getArgumentsin classPlugin
-
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.- Specified by:
beforeConfigin classCompilerPlugin- Parameters:
builder- theConfig.Builderconfig- the not yet builtConfig. Can be used to get configuration set on theConfig.Builderso far.- Throws:
IOException
-
helloClass
Description copied from class:CompilerPluginCalled just before a class is about to be compiled. Modifications to the underlyingSootClass(Clazz.getSootClass()) are not allowed this stage. Used to allow plugins to evaluate class before modification- Overrides:
helloClassin classCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.
-
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.- Specified by:
beforeClassin classCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.moduleBuilder- theModuleBuilderholding the generated bitcode.- Throws:
IOException
-
beforeMethod
public void beforeMethod(Config config, Clazz clazz, soot.SootMethod method, ModuleBuilder moduleBuilder) throws IOExceptionDescription copied from class:CompilerPluginCalled just before a method is about to be compiled. Modifications to the underlyingSootMethodshould be done at this stage.- Specified by:
beforeMethodin classCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.method- the method being compiled.moduleBuilder- theModuleBuilderholding the generated bitcode.- Throws:
IOException
-
afterClass
Description copied from class:CompilerPluginCalled after a class has been compiled to LLVM bitcode but before it is converted into machine code.- Specified by:
afterClassin classCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.moduleBuilder- theModuleBuilderholding the generated bitcode.- Throws:
IOException
-
afterMethod
public void afterMethod(Config config, Clazz clazz, soot.SootMethod method, ModuleBuilder moduleBuilder, Function function) throws IOExceptionDescription copied from class:CompilerPluginCalled after a method has been compiled to LLVM bitcode but before it is converted into machine code.- Specified by:
afterMethodin classCompilerPlugin- Parameters:
config- the currentConfig.clazz- theClazzbeing compiled.method- the method being compiled.moduleBuilder- theModuleBuilderholding the generated bitcode.function- the function corresponding to the method.- Throws:
IOException
-
afterClassDependenciesResolved
Description copied from class:CompilerPluginCalled after dependencies resolved and added to the list. It is the moment when all work with clazz is finished (machine code generation pending) and all associated resources might be released- Specified by:
afterClassDependenciesResolvedin classCompilerPlugin- Parameters:
config- the currentConfigclazz- theClazzbeing compiled
-
afterObjectFile
public void afterObjectFile(Config config, Clazz clazz, File objectFile, ObjectFile objectFileData) throws IOExceptionDescription copied from class:CompilerPluginCalled after the object file of a class has been compiled to an object file.- Specified by:
afterObjectFilein classCompilerPlugin- Parameters:
config- the currentConfigclazz- theClazzbeing compiledobjectFile- the object fileobjectFileData- LLVM read object file data- Throws:
IOException
-
beforeLinker
Description copied from class:CompilerPluginCalled just beforeLinkeris invoked.- Specified by:
beforeLinkerin classCompilerPlugin- Parameters:
config- the currentConfiglinker- theLinkerinstance.classes- the classes that will be linked.- Throws:
IOException
-
afterLinker
Description copied from class:CompilerPluginCalled just beforeLinkeris invoked.- Specified by:
afterLinkerin classCompilerPlugin- Parameters:
config- the currentConfigexecutable- the binary- Throws:
IOException
-