/** * Creates a new ErrorHandler with the default logger */ public DefaultErrorHandler() { logger = AnnotationUtils.getLogger(); }
/** * Creates a new ErrorHandler with the default logger */ public DefaultErrorHandler() { logger = AnnotationUtils.getLogger(); }
/** Creates a new instance of AnnotationProcessorImpl */ public AnnotationProcessorImpl() { logger = AnnotationUtils.getLogger(); }
/** Creates a new instance of AnnotationProcessorImpl */ public AnnotationProcessorImpl() { logger = AnnotationUtils.getLogger(); }
public void process(File directory, Object bundleDesc, ClassLoader classLoader) throws IOException { AnnotationUtils.getLogger().finer("dir is " + directory); AnnotationUtils.getLogger().finer("classLoader is " + classLoader); this.directory = directory; this.classLoader = classLoader; init(directory); }
public void process(File directory, Object bundleDesc, ClassLoader classLoader) throws IOException { AnnotationUtils.getLogger().finer("dir is " + directory); AnnotationUtils.getLogger().finer("classLoader is " + classLoader); this.directory = directory; this.classLoader = classLoader; init(directory); }
@Override public void process(File af, EjbBundleDescriptor desc, ClassLoader cl) throws IOException { this.archiveFile = af; this.classLoader = cl; if (AnnotationUtils.getLogger().isLoggable(Level.FINE)) { AnnotationUtils.getLogger().fine("archiveFile is " + archiveFile); AnnotationUtils.getLogger().fine("classLoader is " + classLoader); } if (!archiveFile.isDirectory()) return ; // in app client jar addScanDirectories(); addClassesFromDescriptor(desc); }
public Set<Class> getElements() { Set<Class> elements = new HashSet<Class>(); if (getClassLoader() == null) { AnnotationUtils.getLogger().severe("Class loader null"); return elements; } for (String className : entries) { if (AnnotationUtils.getLogger().isLoggable(Level.FINE)) { AnnotationUtils.getLogger().fine("Getting " + className); } try { elements.add(classLoader.loadClass(className)); } catch (NoClassDefFoundError err) { AnnotationUtils.getLogger().log(Level.WARNING, "Error in annotation processing: " + err); } catch(ClassNotFoundException cnfe) { AnnotationUtils.getLogger().log(Level.WARNING, "Cannot load " + className + " reason : " + cnfe.getMessage(), cnfe); } } return elements; }
/** * @return the previously set ClientContext casted to the requestd * type if possible or throw an exception otherwise. */ public <U extends AnnotatedElementHandler> U getHandler(Class<U> contextType) throws ClassCastException { if (handlers.isEmpty()) return null; if (AnnotationUtils.shouldLog("handler")) { AnnotationUtils.getLogger().finer("Top handler is " + handlers.peek()); } return contextType.cast(handlers.peek()); }
/** * @return the previously set ClientContext casted to the requestd * type if possible or throw an exception otherwise. */ public <U extends AnnotatedElementHandler> U getHandler(Class<U> contextType) throws ClassCastException { if (handlers.isEmpty()) return null; if (AnnotationUtils.shouldLog("handler")) { AnnotationUtils.getLogger().finer("Top handler is " + handlers.peek()); } return contextType.cast(handlers.peek()); }
public Set<Class> getElements() { Set<Class> elements = new HashSet<Class>(); if (getClassLoader()==null) { AnnotationUtils.getLogger().severe("Class loader null"); return elements; } for (String fileName : entries) { // convert to a class name... String className = fileName.replace(File.separatorChar, '.'); className = className.substring(0, className.length()-6); System.out.println("Getting " + className); try { elements.add(classLoader.loadClass(className)); } catch(Throwable cnfe) { AnnotationUtils.getLogger().severe("cannot load " + className + " reason : " + cnfe.getMessage()); } } return elements; } }
public Set<Class> getElements() { Set<Class> elements = new HashSet<Class>(); if (getClassLoader()==null) { AnnotationUtils.getLogger().severe("Class loader null"); return elements; } for (String fileName : entries) { // convert to a class name... String className = fileName.replace(File.separatorChar, '.'); className = className.substring(0, className.length()-6); System.out.println("Getting " + className); try { elements.add(classLoader.loadClass(className)); } catch(Throwable cnfe) { AnnotationUtils.getLogger().severe("cannot load " + className + " reason : " + cnfe.getMessage()); } } return elements; } }
public Set<Class> getElements() { Set<Class> elements = new HashSet<Class>(); if (getClassLoader()==null) { AnnotationUtils.getLogger().severe("Class loader null"); return elements; } for (JarEntry je : entries) { String fileName = je.getName(); // convert to a class name... String className = fileName.replace(File.separatorChar, '.'); className = className.substring(0, className.length()-6); try { elements.add(classLoader.loadClass(className)); } catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); } } return elements; }
public void process(File archiveFile, ConnectorDescriptor desc, ClassLoader classLoader) throws IOException { if (AnnotationUtils.getLogger().isLoggable(Level.FINE)) { AnnotationUtils.getLogger().fine("archiveFile is " + archiveFile); AnnotationUtils.getLogger().fine("classLoader is " + classLoader); } this.archiveFile = archiveFile; this.classLoader = classLoader; if (archiveFile.isDirectory()) { addScanDirectory(archiveFile); // add top level jars for scanning File[] jarFiles = archiveFile.listFiles(new FileFilter() { public boolean accept(File pathname) { return (pathname.isFile() && pathname.getAbsolutePath().endsWith(".jar")); } }); if (jarFiles != null && jarFiles.length > 0) { for (File jarFile : jarFiles) { addScanJar(jarFile); } } }else{ AnnotationUtils.getLogger().fine("RARScanner : not a directory : " + archiveFile.getName()); } } }
public void process(File archiveFile, ConnectorDescriptor desc, ClassLoader classLoader) throws IOException { if (AnnotationUtils.getLogger().isLoggable(Level.FINE)) { AnnotationUtils.getLogger().fine("archiveFile is " + archiveFile); AnnotationUtils.getLogger().fine("classLoader is " + classLoader); } this.archiveFile = archiveFile; this.classLoader = classLoader; if (archiveFile.isDirectory()) { addScanDirectory(archiveFile); // add top level jars for scanning File[] jarFiles = archiveFile.listFiles(new FileFilter() { public boolean accept(File pathname) { return (pathname.isFile() && pathname.getAbsolutePath().endsWith(".jar")); } }); if (jarFiles != null && jarFiles.length > 0) { for (File jarFile : jarFiles) { addScanJar(jarFile); } } }else{ AnnotationUtils.getLogger().fine("RARScanner : not a directory : " + archiveFile.getName()); } } }
public Set<Class> getElements() { Set<Class> elements = new HashSet<Class>(); if (getClassLoader()==null) { AnnotationUtils.getLogger().severe("Class loader null"); return elements; } for (JarEntry je : entries) { String fileName = je.getName(); // convert to a class name... String className = fileName.replace(File.separatorChar, '.'); className = className.substring(0, className.length()-6); try { elements.add(classLoader.loadClass(className)); } catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); } } return elements; }
private void logEnd(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " END : " + c); } // pop it from our annotated element stack annotatedElements.pop(); if(delegate!=null) { delegate.getStack().pop(); } if (handler!=null) { handler.endElement(type, c); } }
private void logEnd(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " END : " + c); } // pop it from our annotated element stack annotatedElements.pop(); if(delegate!=null) { delegate.getStack().pop(); } if (handler!=null) { handler.endElement(type, c); } }
private void logStart(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " START : " + c); } // push it to our annotated element stack annotatedElements.push(new StackElement(type, c)); if(delegate!=null) { delegate.getStack().push(new StackElement(type, c)); } if (handler!=null) { handler.startElement(type, c); } }
private void logStart(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " START : " + c); } // push it to our annotated element stack annotatedElements.push(new StackElement(type, c)); if(delegate!=null) { delegate.getStack().push(new StackElement(type, c)); } if (handler!=null) { handler.startElement(type, c); } }