Class TestJavaFileObject
- java.lang.Object
-
- javax.tools.SimpleJavaFileObject
-
- org.kordamp.jipsy.processor.testutils.TestJavaFileObject
-
- All Implemented Interfaces:
javax.tools.FileObject,javax.tools.JavaFileObject
public final class TestJavaFileObject extends javax.tools.SimpleJavaFileObject
-
-
Field Summary
Fields Modifier and Type Field Description static javax.tools.JavaFileObjectHELLO_WORLDstatic java.lang.Iterable<javax.tools.JavaFileObject>ONLY_HELLO_WORLDprivate java.lang.CharSequenceprogramText
-
Constructor Summary
Constructors Modifier Constructor Description privateTestJavaFileObject(java.lang.String className, java.lang.CharSequence programText)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.tools.JavaFileObjectcreate(java.lang.String className, java.lang.String content)java.lang.CharSequencegetCharContent(boolean ignoreEncodingErrors)static java.lang.Iterable<? extends javax.tools.JavaFileObject>read(FileType type, java.lang.String... names)private static java.lang.CharSequencereadFile(FileType type, java.lang.String name)private static java.net.URIuri(java.lang.String className)
-
-
-
Method Detail
-
getCharContent
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors) throws java.io.IOException- Specified by:
getCharContentin interfacejavax.tools.FileObject- Overrides:
getCharContentin classjavax.tools.SimpleJavaFileObject- Throws:
java.io.IOException
-
uri
private static java.net.URI uri(java.lang.String className)
-
create
public static javax.tools.JavaFileObject create(java.lang.String className, java.lang.String content)
-
read
public static java.lang.Iterable<? extends javax.tools.JavaFileObject> read(FileType type, java.lang.String... names) throws java.io.IOException
- Throws:
java.io.IOException
-
readFile
private static java.lang.CharSequence readFile(FileType type, java.lang.String name) throws java.io.FileNotFoundException, java.io.IOException
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
-