Package spoon.compiler
Interface SpoonFile
- All Superinterfaces:
SpoonResource
- All Known Implementing Classes:
FileSystemFile
,VirtualFile
,ZipFile
This interface represents files that can be used as resources for the Spoon
compiler.
-
Method Summary
Modifier and TypeMethodDescriptionGets 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
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 Details
-
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
Gets the file content as a char array, considering encoding or encoding provider.
-