Class DirectoryArchive
- java.lang.Object
-
- org.glassfish.hk2.classmodel.reflect.util.AbstractAdapter
-
- org.glassfish.hk2.classmodel.reflect.util.DirectoryArchive
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ArchiveAdapter
public class DirectoryArchive extends AbstractAdapter
Directory base archive abstraction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.hk2.classmodel.reflect.ArchiveAdapter
ArchiveAdapter.Entry, ArchiveAdapter.EntryTask, ArchiveAdapter.Selector
-
-
Constructor Summary
Constructors Constructor Description DirectoryArchive(Parser parser, java.io.File directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.util.jar.ManifestgetManifest()Returns the manifest instance for the archive.java.net.URIgetURI()Returns the URI of the archiveprivate java.lang.Stringmangle(java.io.File f)voidonSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger)perform a task on selected archive entriesprivate voidparse(java.io.File dir, ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger)java.lang.StringtoString()-
Methods inherited from class org.glassfish.hk2.classmodel.reflect.util.AbstractAdapter
onAllEntries
-
-
-
-
Field Detail
-
directory
public final java.io.File directory
-
parser
public final Parser parser
-
-
Constructor Detail
-
DirectoryArchive
public DirectoryArchive(Parser parser, java.io.File directory)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getURI
public java.net.URI getURI()
Description copied from interface:ArchiveAdapterReturns the URI of the archive- Returns:
- URI of the archive
-
getManifest
public java.util.jar.Manifest getManifest() throws java.io.IOExceptionDescription copied from interface:ArchiveAdapterReturns the manifest instance for the archive.- Returns:
- the archive's manifest
- Throws:
java.io.IOException- if the manifest cannot be loaded.
-
onSelectedEntries
public void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger) throws java.io.IOException
Description copied from interface:ArchiveAdapterperform a task on selected archive entries- Parameters:
selector- implementation to select the archive archive entries on which the task should be performed.task- the task to performlogger- for any logging activity- Throws:
java.io.IOException- can be generated while reading the archive entries
-
parse
private void parse(java.io.File dir, ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger) throws java.io.IOException- Throws:
java.io.IOException
-
mangle
private java.lang.String mangle(java.io.File f)
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
-