public class ByteCodeAnnotationFilter extends Object
This class reads Java class files and checks whether they contain references to PrettyFaces annotations. This allows to check classes for the presence of annotations before instantiating them.
The filter is inspired by the ClassByteCodeAnnotationFilter
of Apache MyFaces 2.0. Many thanks go out to Leonardo Uribe for
his great work on this class.
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html,
http://en.wikipedia.org/wiki/Class_%28file_format%29| Constructor and Description |
|---|
ByteCodeAnnotationFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(InputStream classFileStream)
Checks whether that supplied
InputStream contains a Java class
file that might contain PrettyFaces annotations. |
public boolean accept(InputStream classFileStream) throws IOException
Checks whether that supplied InputStream contains a Java class
file that might contain PrettyFaces annotations.
The caller of this method is responsible to close the supplied
InputStream. This method won't do it!
classFileStream - The stream to read the class file from.true for files that should be further checked for
annotationsIOException - for any kind of IO problemCopyright © 2013 OCPsoft. All Rights Reserved.