Package spoon.support.compiler
Class FileSystemFile
java.lang.Object
spoon.support.compiler.FileSystemFile
- All Implemented Interfaces:
SpoonFile
,SpoonResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the file content as a stream.Gets 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.int
hashCode()
boolean
Tells if this file is an actual file (not a virtual file that holds in-memory contents).boolean
Tells if this resource is an archive.boolean
isFile()
Tells if this resource is a file.boolean
isJava()
True if a Java source code file.toFile()
Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface spoon.compiler.SpoonFile
getContentChars
-
Constructor Details
-
FileSystemFile
-
FileSystemFile
-
-
Method Details
-
getContent
Description copied from interface:SpoonFile
Gets the file content as a stream.- Specified by:
getContent
in interfaceSpoonFile
-
getName
Description copied from interface:SpoonResource
Gets the name of this resource.- Specified by:
getName
in interfaceSpoonResource
-
getParent
Description copied from interface:SpoonResource
Gets the folder that contains this resource.- Specified by:
getParent
in interfaceSpoonResource
-
getFileSystemParent
Description copied from interface:SpoonResource
Gets the parent of this resource on the file system.- Specified by:
getFileSystemParent
in interfaceSpoonResource
-
isFile
public boolean isFile()Description copied from interface:SpoonResource
Tells if this resource is a file.- Specified by:
isFile
in interfaceSpoonResource
-
isJava
public boolean isJava()Description copied from interface:SpoonFile
True if a Java source code file. -
getPath
Description copied from interface:SpoonResource
Gets this resource path.- Specified by:
getPath
in interfaceSpoonResource
-
toString
-
isArchive
public boolean isArchive()Description copied from interface:SpoonResource
Tells if this resource is an archive.- Specified by:
isArchive
in interfaceSpoonResource
-
toFile
Description copied from interface:SpoonResource
Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).- Specified by:
toFile
in interfaceSpoonResource
-
isActualFile
public boolean isActualFile()Description copied from interface:SpoonFile
Tells if this file is an actual file (not a virtual file that holds in-memory contents).- Specified by:
isActualFile
in interfaceSpoonFile
- Returns:
-
equals
-
hashCode
public int hashCode()
-