1 23 package com.sun.enterprise.deployment.annotation.introspection; 24 25 import java.util.HashSet ; 26 import java.util.Set ; 27 28 33 public abstract class AbstractAnnotationScanner implements CustomAnnotationScanner { 34 35 36 protected Set <String > annotations=null; 37 38 39 public AbstractAnnotationScanner() { 40 } 41 42 50 protected abstract void init(Set <String > annotationsSet); 51 52 59 public boolean isAnnotation(String value) { 60 if (annotations==null) { 61 synchronized(this) { 62 if (annotations == null) { 63 annotations = new HashSet (); 64 init(annotations); 65 } 66 } 67 } 68 return annotations.contains(value); 69 } 70 } 71 | Popular Tags |