Package oms3.compiler
Class MemorySourceJavaFileObject
- java.lang.Object
-
- javax.tools.SimpleJavaFileObject
-
- oms3.compiler.MemorySourceJavaFileObject
-
- All Implemented Interfaces:
FileObject,JavaFileObject
public class MemorySourceJavaFileObject extends SimpleJavaFileObject
A Java source file that exists in memory.- Author:
- prunge
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
-
-
Field Summary
-
Fields inherited from class javax.tools.SimpleJavaFileObject
kind, uri
-
-
Constructor Summary
Constructors Constructor Description MemorySourceJavaFileObject(String name, String code)Constructs aMemoryJavaFileObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequencegetCharContent(boolean ignoreEncErrors)-
Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openInputStream, openOutputStream, openReader, openWriter, toString, toUri
-
-
-
-
Constructor Detail
-
MemorySourceJavaFileObject
public MemorySourceJavaFileObject(String name, String code)
Constructs aMemoryJavaFileObject.- Parameters:
name- the name of the source file.code- the source code.- Throws:
IllegalArgumentException- ifnameis not valid.NullPointerException- if any parameter is null.
-
-
Method Detail
-
getCharContent
public CharSequence getCharContent(boolean ignoreEncErrors) throws IOException
- Specified by:
getCharContentin interfaceFileObject- Overrides:
getCharContentin classSimpleJavaFileObject- Throws:
IOException
-
-