Class PhysicalFileObject
java.lang.Object
de.firemage.autograder.core.compiler.PhysicalFileObject
- All Implemented Interfaces:
CompilationUnit,Serializable,FileObject,JavaFileObject
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharset()Returns the original charset of the compilation unit.booleandelete()getCharContent(boolean ignoreEncodingErrors) getKind()longgetName()booleanisNameCompatible(String simpleName, JavaFileObject.Kind kind) openReader(boolean ignoreEncodingErrors) path()Returns the path including the name of the compilation unit.Converts this compilation unit to aJavaFileObject.toUri()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.firemage.autograder.core.file.CompilationUnit
readString
-
Constructor Details
-
PhysicalFileObject
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceFileObject
-
getCharContent
- Specified by:
getCharContentin interfaceFileObject- Throws:
IOException
-
openOutputStream
- Specified by:
openOutputStreamin interfaceFileObject- Throws:
IOException
-
toJavaFileObject
Description copied from interface:CompilationUnitConverts this compilation unit to aJavaFileObject.- Specified by:
toJavaFileObjectin interfaceCompilationUnit- Returns:
- the
JavaFileObject
-
charset
Description copied from interface:CompilationUnitReturns the original charset of the compilation unit.- Specified by:
charsetin interfaceCompilationUnit- Returns:
- the charset of the source file
-
path
Description copied from interface:CompilationUnitReturns the path including the name of the compilation unit.The path must not include the root. For example if the root is
src/main/javaand the compilation unit issrc/main/java/de/firemage/autograder/core/file/CompilationUnit.java, the path must bede/firemage/autograder/core/file/CompilationUnit.java.- Specified by:
pathin interfaceCompilationUnit- Returns:
- the path of the compilation unit
- See Also:
-
SourcePath.resolve(SourcePath)
-
toUri
- Specified by:
toUriin interfaceFileObject
-
openInputStream
- Specified by:
openInputStreamin interfaceFileObject- Throws:
IOException
-
openReader
- Specified by:
openReaderin interfaceFileObject- Throws:
IOException
-
openWriter
- Specified by:
openWriterin interfaceFileObject- Throws:
IOException
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceFileObject
-
delete
public boolean delete()- Specified by:
deletein interfaceFileObject
-
getKind
- Specified by:
getKindin interfaceJavaFileObject
-
isNameCompatible
- Specified by:
isNameCompatiblein interfaceJavaFileObject
-
getNestingKind
- Specified by:
getNestingKindin interfaceJavaFileObject
-
getAccessLevel
- Specified by:
getAccessLevelin interfaceJavaFileObject
-