Package spoon.compiler
Interface SpoonFile
-
- All Superinterfaces:
SpoonResource
- All Known Implementing Classes:
FileSystemFile
,VirtualFile
,ZipFile
public interface SpoonFile extends SpoonResource
This interface represents files that can be used as resources for the Spoon compiler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description InputStream
getContent()
Gets the file content as a stream.default char[]
getContentChars(Environment env)
Gets the file content as a char array, considering encoding or encoding provider.boolean
isActualFile()
Tells if this file is an actual file (not a virtual file that holds in-memory contents).boolean
isJava()
True if a Java source code file.-
Methods inherited from interface spoon.compiler.SpoonResource
getFileSystemParent, getName, getParent, getPath, isArchive, isFile, toFile
-
-
-
-
Method Detail
-
getContent
InputStream getContent()
Gets the file content as a stream.
-
isJava
boolean isJava()
True if a Java source code file.
-
isActualFile
boolean isActualFile()
Tells if this file is an actual file (not a virtual file that holds in-memory contents).- Returns:
-
getContentChars
default char[] getContentChars(Environment env)
Gets the file content as a char array, considering encoding or encoding provider.
-
-