Package com.goatshriek.rubydragon.kotlin
Class KotlinScriptProvider
java.lang.Object
ghidra.app.script.GhidraScriptProvider
com.goatshriek.rubydragon.kotlin.KotlinScriptProvider
- All Implemented Interfaces:
ghidra.util.classfinder.ExtensionPoint,Comparable<ghidra.app.script.GhidraScriptProvider>
public class KotlinScriptProvider
extends ghidra.app.script.GhidraScriptProvider
Supports Kotlin scripts within Ghidra.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateNewScript(generic.jar.ResourceFile newScript, String category) Creates a new script file for the given script and category.Returns a Pattern that matches block comment closings.Returns a Pattern that matches block comment openings.The comment character for Kotlin scripts.A short description of the type of scripts this provider supports.The extension of Kotlin scripts, including the period.ghidra.app.script.GhidraScriptgetScriptInstance(generic.jar.ResourceFile sourceFile, PrintWriter writer) Creates a new KotlinScript instance for the given file and returns it.Methods inherited from class ghidra.app.script.GhidraScriptProvider
compareTo, deleteScript, equals, getRuntimeEnvironmentName, hashCode, toString
-
Constructor Details
-
KotlinScriptProvider
public KotlinScriptProvider()
-
-
Method Details
-
createNewScript
Creates a new script file for the given script and category.- Specified by:
createNewScriptin classghidra.app.script.GhidraScriptProvider- Throws:
IOException
-
getBlockCommentStart
Returns a Pattern that matches block comment openings. For Kotlin this is "/*".- Overrides:
getBlockCommentStartin classghidra.app.script.GhidraScriptProvider- Returns:
- the Pattern for Kotlin block comment openings
-
getBlockCommentEnd
Returns a Pattern that matches block comment closings. In Kotlin this is an asterisk followed by a forward slash.- Overrides:
getBlockCommentEndin classghidra.app.script.GhidraScriptProvider- Returns:
- the Pattern for Kotlin block comment closings
-
getCommentCharacter
The comment character for Kotlin scripts.- Specified by:
getCommentCharacterin classghidra.app.script.GhidraScriptProvider
-
getDescription
A short description of the type of scripts this provider supports.- Specified by:
getDescriptionin classghidra.app.script.GhidraScriptProvider
-
getExtension
The extension of Kotlin scripts, including the period.- Specified by:
getExtensionin classghidra.app.script.GhidraScriptProvider
-
getScriptInstance
public ghidra.app.script.GhidraScript getScriptInstance(generic.jar.ResourceFile sourceFile, PrintWriter writer) throws ghidra.app.script.GhidraScriptLoadException Creates a new KotlinScript instance for the given file and returns it.- Specified by:
getScriptInstancein classghidra.app.script.GhidraScriptProvider- Throws:
ghidra.app.script.GhidraScriptLoadException
-