public class JavaSourceFromString
extends javax.tools.SimpleJavaFileObject
Constructor and Description |
---|
JavaSourceFromString(java.lang.String name,
java.lang.String code)
Constructs a new JavaSourceFromString.
|
JavaSourceFromString(java.lang.String name,
java.lang.String code,
int identifier)
Constructs a new JavaSourceFromString.
|
Modifier and Type | Method and Description |
---|---|
java.lang.CharSequence |
getCharContent(boolean ignoreEncodingErrors) |
java.lang.String |
getClassName() |
java.lang.String |
getCode() |
java.io.File |
getFileData() |
int |
getIdentifier() |
void |
setFileData(java.io.File fileData) |
public JavaSourceFromString(java.lang.String name, java.lang.String code)
name
- the name of the compilation unit represented by this file objectcode
- the source code for the compilation unit represented by this file
objectpublic JavaSourceFromString(java.lang.String name, java.lang.String code, int identifier)
name
- the name of the compilation unit represented by this file objectcode
- the source code for the compilation unit represented by this file
objectidentifier
- the hashcode of the pathpublic java.io.File getFileData()
public void setFileData(java.io.File fileData)
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
getCharContent
in interface javax.tools.FileObject
getCharContent
in class javax.tools.SimpleJavaFileObject
public java.lang.String getCode()
public java.lang.String getClassName()
public int getIdentifier()