1 23 package com.sun.enterprise.deployment.annotation.introspection; 24 25 import java.nio.channels.ReadableByteChannel ; 26 import java.nio.ByteBuffer ; 27 import java.io.IOException ; 28 29 import java.util.Set ; 30 import java.util.HashSet ; 31 import java.util.List ; 32 import java.util.Vector ; 33 34 import com.sun.enterprise.deployment.annotation.factory.SJSASFactory; 35 36 37 43 public class AnnotationScanner { 44 45 private static Set <String > annotations=null; 46 47 48 private AnnotationScanner() { 49 } 50 51 58 public static boolean isAnnotation(String value) { 59 if (annotations==null) { 60 synchronized(AnnotationScanner.class) { 61 if (annotations==null) 62 init(); 63 } 64 } 65 return annotations.contains(value); 66 } 67 68 private static void init() { 69 annotations = SJSASFactory.getAnnotations(); 70 } 71 } 72 | Popular Tags |