com.sun.jersey.spi.scanning
Class AnnotationScannerListener

java.lang.Object  extended by com.sun.jersey.spi.scanning.AnnotationScannerListener
All Implemented Interfaces:
ScannerListener
Direct Known Subclasses:
PathProviderScannerListener

public class AnnotationScannerListener
extends java.lang.Object
implements ScannerListener

A scanner listener that processes Java class files (resource names ending in ".class") annotated with one or more of a set of declared annotations.

Java classes of a Java class file are processed, using ASM, to ascertain if those classes are annotated with one or more of the set of declared annotations.

Such an annotated Java class of a Java class file is loaded if the class is public or is an inner class that is static and public.

Author:
Paul.Sandoz@Sun.Com


Constructor Summary
AnnotationScannerListener(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
          Create a scanner listener to check for annotated Java classes in Java class files.
AnnotationScannerListener(java.lang.ClassLoader classloader, java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
          Create a scanner listener to check for annotated Java classes in Java class files.
 
Method Summary
 java.util.Set<java.lang.Class<?>>getAnnotatedClasses()
          Get the set of annotated classes.
 booleanonAccept(java.lang.String name)
           
 voidonProcess(java.lang.String name, java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationScannerListener

public AnnotationScannerListener(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Create a scanner listener to check for annotated Java classes in Java class files.

Parameters:
annotations - the set of annotation classes to check on Java class files.


AnnotationScannerListener

public AnnotationScannerListener(java.lang.ClassLoader classloader,                                 java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Create a scanner listener to check for annotated Java classes in Java class files.

Parameters:
classloader - the class loader to use to load Java classes that are annotated with any one of the annotations.
annotations - the set of annotation classes to check on Java class files.

Method Detail

getAnnotatedClasses

public java.util.Set<java.lang.Class<?>> getAnnotatedClasses()
Get the set of annotated classes.

Returns:
the set of annotated classes.

onAccept

public boolean onAccept(java.lang.String name)
Specified by:
onAccept in interface ScannerListener

onProcess

public void onProcess(java.lang.String name,                      java.io.InputStream in)               throws java.io.IOException
Specified by:
onProcess in interface ScannerListener
Throws:
java.io.IOException


Copyright © 2011
Oracle Corporation. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14