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 Type
    Method
    Description
    Gets the parent of this resource on the file system.
    Gets the name of this resource.
    Gets the folder that contains this resource.
    Gets this resource path.
    boolean
    Tells if this resource is an archive.
    boolean
    Tells if this resource is a file.
    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).