Package org.jctools.util
Class StringWrappingJavaFile
- java.lang.Object
-
- javax.tools.SimpleJavaFileObject
-
- org.jctools.util.StringWrappingJavaFile
-
- All Implemented Interfaces:
javax.tools.FileObject
,javax.tools.JavaFileObject
public class StringWrappingJavaFile extends javax.tools.SimpleJavaFileObject
A Java file object which is used to represent the Java source code coming from a string.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
code
The source code of this "file".
-
Constructor Summary
Constructors Constructor Description StringWrappingJavaFile(java.lang.String name, java.lang.String code)
Constructs a new JavaSourceFromString.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequence
getCharContent(boolean ignoreEncodingErrors)
private static java.net.URI
getFileUri(java.lang.String name)
-
-
-
Constructor Detail
-
StringWrappingJavaFile
public StringWrappingJavaFile(java.lang.String name, java.lang.String code)
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 Detail
-
getFileUri
private static java.net.URI getFileUri(java.lang.String name)
-
getCharContent
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
- Specified by:
getCharContent
in interfacejavax.tools.FileObject
- Overrides:
getCharContent
in classjavax.tools.SimpleJavaFileObject
-
-