org.hibernate.ejb.packaging
Class JavaElementFilter

java.lang.Object
  extended by org.hibernate.ejb.packaging.Filter
      extended by org.hibernate.ejb.packaging.JavaElementFilter
Direct Known Subclasses:
ClassFilter, PackageFilter

public abstract class JavaElementFilter
extends Filter

Filter a Java element (class or package per fully qualified name and annotation existence) At least 1 annotation has to annotate the element and the accept method must match If none annotations are passed, only the accept method must pass.

Author:
Emmanuel Bernard

Constructor Summary
protected JavaElementFilter(boolean retrieveStream, Class[] annotations)
           
 
Method Summary
abstract  boolean accept(String javaElementName)
          Return true if the fully qualified name match
 Class[] getAnnotations()
           
 
Methods inherited from class org.hibernate.ejb.packaging.Filter
getStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaElementFilter

protected JavaElementFilter(boolean retrieveStream,
                            Class[] annotations)
Parameters:
retrieveStream - Give back an open stream to the matching element or not
annotations - Array of annotations that must be present to match (1 of them should annotate the element
Method Detail

getAnnotations

public Class[] getAnnotations()

accept

public abstract boolean accept(String javaElementName)
Return true if the fully qualified name match



Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.