Package spoon.support.compiler
Class ZipFile
java.lang.Object
spoon.support.compiler.ZipFile
- All Implemented Interfaces:
SpoonFile,SpoonResource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets 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.inthashCode()booleanTells if this file is an actual file (not a virtual file that holds in-memory contents).booleanTells if this resource is an archive.booleanisFile()Tells if this resource is a file.booleanisJava()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, waitMethods inherited from interface spoon.compiler.SpoonFile
getContentChars
-
Constructor Details
-
ZipFile
Deprecated.Creates a new zip file. Should never be called manually.- Parameters:
parent- the parent foldername- the name of the filecontent- the content of the file
-
ZipFile
Creates a new zip file. Should never be called manually.- Parameters:
parent- the parent foldername- the name of the filetempFile- the temporary file it was cached to
-
-
Method Details
-
getContent
Description copied from interface:SpoonFileGets the file content as a stream.- Specified by:
getContentin interfaceSpoonFile
-
getName
Description copied from interface:SpoonResourceGets the name of this resource.- Specified by:
getNamein interfaceSpoonResource
-
getParent
Description copied from interface:SpoonResourceGets the folder that contains this resource.- Specified by:
getParentin interfaceSpoonResource
-
getFileSystemParent
Description copied from interface:SpoonResourceGets the parent of this resource on the file system.- Specified by:
getFileSystemParentin interfaceSpoonResource
-
isFile
public boolean isFile()Description copied from interface:SpoonResourceTells if this resource is a file.- Specified by:
isFilein interfaceSpoonResource
-
isJava
public boolean isJava()Description copied from interface:SpoonFileTrue if a Java source code file. -
getPath
Description copied from interface:SpoonResourceGets this resource path.- Specified by:
getPathin interfaceSpoonResource
-
toString
-
isArchive
public boolean isArchive()Description copied from interface:SpoonResourceTells if this resource is an archive.- Specified by:
isArchivein interfaceSpoonResource
-
toFile
Description copied from interface:SpoonResourceGets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).- Specified by:
toFilein interfaceSpoonResource
-
isActualFile
public boolean isActualFile()Description copied from interface:SpoonFileTells if this file is an actual file (not a virtual file that holds in-memory contents).- Specified by:
isActualFilein interfaceSpoonFile- Returns:
-
hashCode
public int hashCode() -
equals
-
ZipFile(ZipFolder, String, Path)