Package spoon.compiler
Interface SpoonResource
- All Known Subinterfaces:
SpoonFile
,SpoonFolder
- All Known Implementing Classes:
FileSystemFile
,FileSystemFolder
,FilteringFolder
,SpoonPom
,VirtualFile
,VirtualFolder
,ZipFile
,ZipFolder
public interface SpoonResource
This interface defines generic resources that are used by
SpoonModelBuilder
in the Java compilation process.-
Method Summary
Modifier and TypeMethodDescriptionGets the parent of this resource on the file system.getName()
Gets the name of this resource.Gets the folder that contains this resource.getPath()
Gets this resource path.boolean
Tells if this resource is an archive.boolean
isFile()
Tells if this resource is a file.toFile()
Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).
-
Method Details
-
getParent
SpoonFolder getParent()Gets the folder that contains this resource. -
getName
String getName()Gets the name of this resource. -
isFile
boolean isFile()Tells if this resource is a file. -
isArchive
boolean isArchive()Tells if this resource is an archive. -
getPath
String getPath()Gets this resource path. -
getFileSystemParent
File getFileSystemParent()Gets the parent of this resource on the file system. -
toFile
File toFile()Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).
-