org.hibernate.ejb.packaging
Class AbstractJarVisitor
java.lang.Object
org.hibernate.ejb.packaging.AbstractJarVisitor
- All Implemented Interfaces:
- JarVisitor
- Direct Known Subclasses:
- ExplodedJarVisitor, FileZippedJarVisitor, InputStreamZippedJarVisitor
public abstract class AbstractJarVisitor
- extends java.lang.Object
- implements JarVisitor
Parse a JAR of any form (zip file, exploded directory, ...)
apply a set of filters (File filter, Class filter, Package filter)
and return the appropriate matching sets of elements
- Author:
- Emmanuel Bernard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
unqualifiedJarName
protected java.lang.String unqualifiedJarName
jarUrl
protected java.net.URL jarUrl
done
protected boolean done
AbstractJarVisitor
protected AbstractJarVisitor(java.lang.String fileName,
Filter[] filters)
AbstractJarVisitor
protected AbstractJarVisitor(java.net.URL url,
Filter[] filters)
unqualify
protected void unqualify()
getUnqualifiedJarName
public java.lang.String getUnqualifiedJarName()
- Get the unqualified Jar name (ie wo path and wo extension)
- Specified by:
getUnqualifiedJarName
in interface JarVisitor
- Returns:
- the unqualified jar name.
getFilters
public Filter[] getFilters()
- Specified by:
getFilters
in interface JarVisitor
getMatchingEntries
public java.util.Set[] getMatchingEntries()
throws java.io.IOException
- Return the matching entries for each filter in the same order the filter where passed
- Specified by:
getMatchingEntries
in interface JarVisitor
- Returns:
- array of Set of JarVisitor.Entry
- Throws:
java.io.IOException
- if something went wrong
doProcessElements
protected abstract void doProcessElements()
throws java.io.IOException
- Throws:
java.io.IOException
addElement
protected final void addElement(java.lang.String entryName,
java.io.InputStream is,
java.io.InputStream secondIs)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2011. All Rights Reserved.