com.sun.enterprise.deployment.annotation.introspection
Class AbstractAnnotationScanner

java.lang.Object
  extended by com.sun.enterprise.deployment.annotation.introspection.AbstractAnnotationScanner
All Implemented Interfaces:
AnnotationScanner
Direct Known Subclasses:
AppClientPersistenceDependencyAnnotationScanner

public abstract class AbstractAnnotationScanner
extends java.lang.Object
implements AnnotationScanner

Abstract superclass for instance-based annotation scanners.

Author:
tjquinn

Field Summary
protected  java.util.Set<java.lang.String> annotations
          holds the annotations of interest to the specific type of scanner
 
Constructor Summary
AbstractAnnotationScanner()
          Creates a new instance of AbstractAnnotationScanner
 
Method Summary
static java.util.Set<java.lang.String> constantPoolToFQCN(java.util.Set<java.lang.String> annotations)
           
 java.util.Set<java.lang.String> getAnnotations()
          Returns a list of FQCN of annotations we are interested in.
protected abstract  void init(java.util.Set<java.lang.String> annotationsSet)
          Invoked so the concrete subclass can populate the annotations set.
 boolean isAnnotation(java.lang.String value)
          Test if the passed constant pool string is a reference to a Type.TYPE annotation of a J2EE component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotations

protected volatile java.util.Set<java.lang.String> annotations
holds the annotations of interest to the specific type of scanner

Constructor Detail

AbstractAnnotationScanner

public AbstractAnnotationScanner()
Creates a new instance of AbstractAnnotationScanner

Method Detail

init

protected abstract void init(java.util.Set<java.lang.String> annotationsSet)
Invoked so the concrete subclass can populate the annotations set.

Concrete implementations of this method should add to the set one or more Strings corresponding to the annotations of interest.

Parameters:
annotationsSet - the Set object to be populated

isAnnotation

public boolean isAnnotation(java.lang.String value)
Test if the passed constant pool string is a reference to a Type.TYPE annotation of a J2EE component

Specified by:
isAnnotation in interface AnnotationScanner
Returns:
true if it is an annotation reference of interest to this scanner

getAnnotations

public java.util.Set<java.lang.String> getAnnotations()
Description copied from interface: AnnotationScanner
Returns a list of FQCN of annotations we are interested in.

Specified by:
getAnnotations in interface AnnotationScanner
Returns:
a list of fully qualified class name list of annotations.

constantPoolToFQCN

public static java.util.Set<java.lang.String> constantPoolToFQCN(java.util.Set<java.lang.String> annotations)


Copyright © 2012 GlassFish Community. All Rights Reserved.