Package ghidra.app.script
Class ResourceFileJavaFileObject
- java.lang.Object
-
- ghidra.app.script.ResourceFileJavaFileObject
-
- All Implemented Interfaces:
javax.tools.FileObject
,javax.tools.JavaFileObject
public class ResourceFileJavaFileObject extends java.lang.Object implements javax.tools.JavaFileObject
AJavaFileObject
that works with Ghidra'sResourceFileJavaFileManager
.This class is used to dynamically compile Ghidra scripts.
-
-
Constructor Summary
Constructors Constructor Description ResourceFileJavaFileObject(ResourceFile sourceRoot, ResourceFile file, javax.tools.JavaFileObject.Kind kind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete()
javax.lang.model.element.Modifier
getAccessLevel()
java.lang.CharSequence
getCharContent(boolean ignoreEncodingErrors)
javax.tools.JavaFileObject.Kind
getKind()
long
getLastModified()
java.lang.String
getName()
javax.lang.model.element.NestingKind
getNestingKind()
boolean
isNameCompatible(java.lang.String compatibleName, javax.tools.JavaFileObject.Kind testKind)
java.io.InputStream
openInputStream()
java.io.OutputStream
openOutputStream()
java.io.Reader
openReader(boolean ignoreEncodingErrors)
java.io.Writer
openWriter()
java.lang.String
toString()
java.net.URI
toUri()
-
-
-
Constructor Detail
-
ResourceFileJavaFileObject
public ResourceFileJavaFileObject(ResourceFile sourceRoot, ResourceFile file, javax.tools.JavaFileObject.Kind kind)
-
-
Method Detail
-
toUri
public java.net.URI toUri()
- Specified by:
toUri
in interfacejavax.tools.FileObject
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacejavax.tools.FileObject
-
openInputStream
public java.io.InputStream openInputStream() throws java.io.IOException
- Specified by:
openInputStream
in interfacejavax.tools.FileObject
- Throws:
java.io.IOException
-
openOutputStream
public java.io.OutputStream openOutputStream() throws java.io.IOException
- Specified by:
openOutputStream
in interfacejavax.tools.FileObject
- Throws:
java.io.IOException
-
openReader
public java.io.Reader openReader(boolean ignoreEncodingErrors) throws java.io.IOException
- Specified by:
openReader
in interfacejavax.tools.FileObject
- Throws:
java.io.IOException
-
getCharContent
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors) throws java.io.IOException
- Specified by:
getCharContent
in interfacejavax.tools.FileObject
- Throws:
java.io.IOException
-
openWriter
public java.io.Writer openWriter() throws java.io.IOException
- Specified by:
openWriter
in interfacejavax.tools.FileObject
- Throws:
java.io.IOException
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfacejavax.tools.FileObject
-
delete
public boolean delete()
- Specified by:
delete
in interfacejavax.tools.FileObject
-
getKind
public javax.tools.JavaFileObject.Kind getKind()
- Specified by:
getKind
in interfacejavax.tools.JavaFileObject
-
isNameCompatible
public boolean isNameCompatible(java.lang.String compatibleName, javax.tools.JavaFileObject.Kind testKind)
- Specified by:
isNameCompatible
in interfacejavax.tools.JavaFileObject
-
getNestingKind
public javax.lang.model.element.NestingKind getNestingKind()
- Specified by:
getNestingKind
in interfacejavax.tools.JavaFileObject
-
getAccessLevel
public javax.lang.model.element.Modifier getAccessLevel()
- Specified by:
getAccessLevel
in interfacejavax.tools.JavaFileObject
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-