Package de.firemage.autograder.core.file
Class FileSourceInfo
java.lang.Object
de.firemage.autograder.core.file.FileSourceInfo
- All Implemented Interfaces:
SourceInfo,Serializable
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the compilation units of the source.Copies the source to the given target directory.spoon.compiler.SpoonResourceReturns the java version required to compile the source.path()Returns a path to the source, which might not exist on the file-system.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.SourceInfo
getCompilationUnit, getCompilationUnit, getCompilationUnit, getName
-
Method Details
-
path
Description copied from interface:SourceInfoReturns a path to the source, which might not exist on the file-system.For example, one could have the entire code in memory, so there would be no path on the file-system.
- Specified by:
pathin interfaceSourceInfo- Returns:
- a path to the source
-
compilationUnits
Description copied from interface:SourceInfoReturns the compilation units of the source.All compilation units must be relative to the root of the source returned by
SourceInfo.path().- Specified by:
compilationUnitsin interfaceSourceInfo- Returns:
- the compilation units of the source or an empty list if there are none
-
copyTo
Description copied from interface:SourceInfoCopies the source to the given target directory.- Specified by:
copyToin interfaceSourceInfo- Parameters:
target- the target directory, which must be accessible- Returns:
- a new
SourceInforepresenting the copied source - Throws:
IOException- if the copy failed
-
getSpoonResource
public spoon.compiler.SpoonResource getSpoonResource()- Specified by:
getSpoonResourcein interfaceSourceInfo
-
getVersion
Description copied from interface:SourceInfoReturns the java version required to compile the source.- Specified by:
getVersionin interfaceSourceInfo- Returns:
- the java version required to compile the source
-