Class InMemoryJavaSourceFileObject
- java.lang.Object
-
- javax.tools.SimpleJavaFileObject
-
- io.github.mkoncek.classpathless.impl.IdentifiedJavaFileObject
-
- io.github.mkoncek.classpathless.impl.InMemoryJavaSourceFileObject
-
- All Implemented Interfaces:
javax.tools.FileObject
,javax.tools.JavaFileObject
public class InMemoryJavaSourceFileObject extends IdentifiedJavaFileObject
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
source
-
Constructor Summary
Constructors Modifier Constructor Description InMemoryJavaSourceFileObject(IdentifiedSource source)
protected
InMemoryJavaSourceFileObject(java.lang.String name)
InMemoryJavaSourceFileObject(java.lang.String name, java.io.InputStream is)
InMemoryJavaSourceFileObject(java.lang.String name, java.lang.String source)
InMemoryJavaSourceFileObject(java.nio.file.Path path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequence
getCharContent(boolean ignoreEncodingErrors)
(package private) ClassIdentifier
getClassIdentifier()
(package private) IdentifiedSource
getIdentifiedSource()
(package private) void
setSource(java.lang.String source)
-
-
-
Constructor Detail
-
InMemoryJavaSourceFileObject
protected InMemoryJavaSourceFileObject(java.lang.String name)
-
InMemoryJavaSourceFileObject
public InMemoryJavaSourceFileObject(java.lang.String name, java.lang.String source)
-
InMemoryJavaSourceFileObject
public InMemoryJavaSourceFileObject(java.lang.String name, java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
InMemoryJavaSourceFileObject
public InMemoryJavaSourceFileObject(java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
InMemoryJavaSourceFileObject
public InMemoryJavaSourceFileObject(IdentifiedSource source)
-
-
Method Detail
-
getClassIdentifier
ClassIdentifier getClassIdentifier()
- Specified by:
getClassIdentifier
in classIdentifiedJavaFileObject
-
getIdentifiedSource
IdentifiedSource getIdentifiedSource()
-
setSource
void setSource(java.lang.String source)
-
getCharContent
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors) throws java.io.IOException
- Specified by:
getCharContent
in interfacejavax.tools.FileObject
- Overrides:
getCharContent
in classjavax.tools.SimpleJavaFileObject
- Throws:
java.io.IOException
-
-