Package net.jangaroo.jooc.input
Class ZipFileInputSource
- java.lang.Object
-
- net.jangaroo.jooc.input.DirectoryInputSource
-
- net.jangaroo.jooc.input.ZipFileInputSource
-
- All Implemented Interfaces:
InputSource
public class ZipFileInputSource extends DirectoryInputSource
-
-
Constructor Summary
Constructors Constructor Description ZipFileInputSource(File file, String[] rootDirs, boolean inSourcePath)Create an InputSource directory from the given zip or jar file, providing a "union view" over the zip file with all entries with paths relative to the given root directoriesZipFileInputSource(File file, String[] rootDirs, boolean inSourcePath, boolean inCompilePath)Create an InputSource directory from the given zip or jar file, providing a "union view" over the zip file with all entries with paths relative to the given root directories
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanequals(Object o)InputSourcegetChild(String path)List<InputSource>getChildren(String path)chargetFileSeparatorChar()StringgetName()The file name, i.e.StringgetNpmPackageName()StringgetPath()StringgetRelativePath()StringgetSenchaPackageName()ZipFilegetZipFile()inthashCode()List<InputSource>list()StringtoString()-
Methods inherited from class net.jangaroo.jooc.input.DirectoryInputSource
getExtNamespace, getInputStream, getParent, isDirectory, isInCompilePath, isInSourcePath
-
-
-
-
Constructor Detail
-
ZipFileInputSource
public ZipFileInputSource(File file, String[] rootDirs, boolean inSourcePath) throws IOException
Create an InputSource directory from the given zip or jar file, providing a "union view" over the zip file with all entries with paths relative to the given root directories- Parameters:
file- a zip or jar filerootDirs- a list of directories to accept as roots (e.g. ["", "META-INF/joo-api"], in lookup orderinSourcePath- whether this is part of the source path- Throws:
IOException- if an IO error occurs
-
ZipFileInputSource
public ZipFileInputSource(File file, String[] rootDirs, boolean inSourcePath, boolean inCompilePath) throws IOException
Create an InputSource directory from the given zip or jar file, providing a "union view" over the zip file with all entries with paths relative to the given root directories- Parameters:
file- a zip or jar filerootDirs- a list of directories to accept as roots (e.g. ["", "META-INF/joo-api"], in lookup orderinSourcePath- whether this is part of the source pathinCompilePath- whether this is part of the compile path- Throws:
IOException- if an IO error occurs
-
-
Method Detail
-
getNpmPackageName
public String getNpmPackageName()
-
getSenchaPackageName
public String getSenchaPackageName()
-
getName
public String getName()
Description copied from interface:InputSourceThe file name, i.e. test.as- Returns:
- the file name
-
getPath
public String getPath()
-
getRelativePath
public String getRelativePath()
-
list
public List<InputSource> list()
-
close
public void close() throws IOException- Specified by:
closein interfaceInputSource- Overrides:
closein classDirectoryInputSource- Throws:
IOException
-
getFileSeparatorChar
public char getFileSeparatorChar()
-
getZipFile
public ZipFile getZipFile()
-
getChild
public InputSource getChild(String path)
-
getChildren
public List<InputSource> getChildren(String path)
-
-