Package ghidra.app.script
Class ResourceFileJavaFileObject
java.lang.Object
ghidra.app.script.ResourceFileJavaFileObject
- All Implemented Interfaces:
FileObject
,JavaFileObject
A
JavaFileObject
that works with Ghidra's ResourceFileJavaFileManager
.
This class is used to dynamically compile Ghidra scripts.
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
-
Constructor Summary
ConstructorDescriptionResourceFileJavaFileObject
(ResourceFile sourceRoot, ResourceFile file, JavaFileObject.Kind kind) -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete()
getCharContent
(boolean ignoreEncodingErrors) getFile()
getKind()
long
getName()
boolean
isNameCompatible
(String compatibleName, JavaFileObject.Kind testKind) openReader
(boolean ignoreEncodingErrors) toString()
toUri()
-
Constructor Details
-
ResourceFileJavaFileObject
public ResourceFileJavaFileObject(ResourceFile sourceRoot, ResourceFile file, JavaFileObject.Kind kind) - Parameters:
sourceRoot
- the root source directoryfile
- the filekind
- the kind
-
-
Method Details
-
getFile
- Returns:
- the
ResourceFile
this object represents
-
toUri
- Specified by:
toUri
in interfaceFileObject
-
getName
- Specified by:
getName
in interfaceFileObject
-
openInputStream
- Specified by:
openInputStream
in interfaceFileObject
- Throws:
IOException
-
openOutputStream
- Specified by:
openOutputStream
in interfaceFileObject
- Throws:
IOException
-
openReader
- Specified by:
openReader
in interfaceFileObject
- Throws:
IOException
-
getCharContent
- Specified by:
getCharContent
in interfaceFileObject
- Throws:
IOException
-
openWriter
- Specified by:
openWriter
in interfaceFileObject
- Throws:
IOException
-
getLastModified
public long getLastModified()- Specified by:
getLastModified
in interfaceFileObject
-
delete
public boolean delete()- Specified by:
delete
in interfaceFileObject
-
getKind
- Specified by:
getKind
in interfaceJavaFileObject
-
isNameCompatible
- Specified by:
isNameCompatible
in interfaceJavaFileObject
-
getNestingKind
- Specified by:
getNestingKind
in interfaceJavaFileObject
-
getAccessLevel
- Specified by:
getAccessLevel
in interfaceJavaFileObject
-
toString
-