Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected boolean` | `done`
`protected java.net.URL` | `jarUrl`
`protected java.lang.String` | `unqualifiedJarName`

Constructor Summary
`protected` | `AbstractJarVisitor(java.lang.String fileName, Filter[] filters)`
`protected` | `AbstractJarVisitor(java.net.URL url, Filter[] filters)`

Method Summary
`protected void` | `addElement(java.lang.String entryName, java.io.InputStream is, java.io.InputStream secondIs)`
`protected abstract void` | `doProcessElements()`
`Filter[]` | `getFilters()`
`java.util.Set[]` | `getMatchingEntries()` Return the matching entries for each filter in the same order the filter where passed
`java.lang.String` | `getUnqualifiedJarName()` Get the unqualified Jar name (ie wo path and wo extension)
`protected void` | `unqualify()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### unqualifiedJarName

    protected java.lang.String unqualifiedJarName

### jarUrl

    protected java.net.URL jarUrl

### done

    protected boolean done

Constructor Detail

### AbstractJarVisitor

    protected AbstractJarVisitor(java.lang.String fileName,
                                 Filter[] filters)

### AbstractJarVisitor

    protected AbstractJarVisitor(java.net.URL url,
                                 Filter[] filters)

Method Detail

### 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`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD