FileDocCategorySizeDatePackage
Factory.javaAPI DocGlassfish v2 API4768Fri May 04 22:30:22 BST 2007com.sun.enterprise.deployment.annotation.factory

Factory

public abstract class Factory extends Object
The Factory is responsible for initializing a ready to use AnnotationProcessor.
author
Jerome Dochez

Fields Summary
private static Set
skipAnnotationClassList
private static final String
SKIP_ANNOTATION_CLASS_LIST_URL
Constructors Summary
protected Factory()
we do no Create new instances of Factory


             
      
    
Methods Summary
public static com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImplgetDefaultAnnotationProcessor()
Return a empty AnnotationProcessor with no annotation handlers registered

return
initialized AnnotationProcessor instance

        return new AnnotationProcessorImpl();        
    
private static voidinit()

    
private static synchronized voidinitSkipAnnotationClassList()

        if (skipAnnotationClassList == null) {
            skipAnnotationClassList = new HashSet<String>();
            InputStream is = null;
            try {
                ClassLoader cl = Thread.currentThread().getContextClassLoader();
                is = cl.getResourceAsStream(SKIP_ANNOTATION_CLASS_LIST_URL);
                BufferedReader bf =
                    new BufferedReader(new InputStreamReader(is));
                String className;
                while ( (className = bf.readLine()) != null ) {
                    skipAnnotationClassList.add(className.trim());
                }
            } catch (IOException ioe) {
                AnnotationUtils.getLogger().log(Level.WARNING, 
                    ioe.getMessage(), ioe);
            } finally {
                if (is != null) {
                    try {
                        is.close(); 
                    } catch (IOException ioe2) {
                        // ignore
                    }
                }
            }
        }
    
public static booleanisSkipAnnotationProcessing(java.lang.String cName)

        if (skipAnnotationClassList == null) {
            initSkipAnnotationClassList();
        }
        return skipAnnotationClassList.contains(cName);