Package org.jctools.util
Class StringWrappingJavaFile
java.lang.Object
javax.tools.SimpleJavaFileObject
org.jctools.util.StringWrappingJavaFile
- All Implemented Interfaces:
FileObject
,JavaFileObject
A Java file object which is used to represent the Java source code coming from a string.
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
-
Field Summary
FieldsFields inherited from class javax.tools.SimpleJavaFileObject
kind, uri
-
Constructor Summary
ConstructorsConstructorDescriptionStringWrappingJavaFile
(String name, String code) Constructs a new JavaSourceFromString. -
Method Summary
Modifier and TypeMethodDescriptiongetCharContent
(boolean ignoreEncodingErrors) private static URI
getFileUri
(String name) Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openInputStream, openOutputStream, openReader, openWriter, toString, toUri
-
Field Details
-
code
The source code of this "file".
-
-
Constructor Details
-
StringWrappingJavaFile
Constructs a new JavaSourceFromString.- Parameters:
name
- the name of the compilation unit represented by this file objectcode
- the source code for the compilation unit represented by this file object
-
-
Method Details
-
getFileUri
-
getCharContent
- Specified by:
getCharContent
in interfaceFileObject
- Overrides:
getCharContent
in classSimpleJavaFileObject
-