class SequenceJavaFileObject
extends javax.tools.SimpleJavaFileObject
JavaFileObject for source code in memory.
based on javaxtools.compiler.JavaFileObjectImple from Create
dynamic applications with javax.tools.
| Modifier and Type | Field and Description |
|---|---|
private java.io.ByteArrayOutputStream |
byteStream
The stream for reading the source code.
|
private java.lang.String |
source
The source code text.
|
| Constructor and Description |
|---|
SequenceJavaFileObject(java.lang.String classFileName,
javax.tools.JavaFileObject.Kind kind)
Creates a
SequenceJavaFileObject for the given class name and kind. |
SequenceJavaFileObject(java.lang.String classFileName,
java.lang.String sequenceClass)
Creates a
SequenceJavaFileObject with the given name and class source. |
| Modifier and Type | Method and Description |
|---|---|
(package private) byte[] |
getByteCode()
Returns the byte stream as a byte array.
|
java.lang.CharSequence |
getCharContent(boolean ignoreEncodingErrors) |
java.io.InputStream |
openInputStream() |
java.io.OutputStream |
openOutputStream() |
private final java.lang.String source
private java.io.ByteArrayOutputStream byteStream
SequenceJavaFileObject(java.lang.String classFileName,
javax.tools.JavaFileObject.Kind kind)
SequenceJavaFileObject for the given class name and kind.classFileName - the name of the classkind - either SOURCE or CLASSSequenceJavaFileObject(java.lang.String classFileName,
java.lang.String sequenceClass)
SequenceJavaFileObject with the given name and class source.classFileName - the name of the classsequenceClass - the class sourcepublic java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
throws java.lang.UnsupportedOperationException
getCharContent in interface javax.tools.FileObjectgetCharContent in class javax.tools.SimpleJavaFileObjectjava.lang.UnsupportedOperationExceptionpublic java.io.InputStream openInputStream()
openInputStream in interface javax.tools.FileObjectopenInputStream in class javax.tools.SimpleJavaFileObjectpublic java.io.OutputStream openOutputStream()
openOutputStream in interface javax.tools.FileObjectopenOutputStream in class javax.tools.SimpleJavaFileObjectbyte[] getByteCode()