[jboss-cvs] JBossAS SVN: r73833 - projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 30 06:18:46 EDT 2008
Author: alesj
Date: 2008-05-30 06:18:45 -0400 (Fri, 30 May 2008)
New Revision: 73833
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/DefaultAnnotationEnvironment.java
projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java
projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java
Log:
Log trace information.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/DefaultAnnotationEnvironment.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/DefaultAnnotationEnvironment.java 2008-05-30 09:58:02 UTC (rev 73832)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/DefaultAnnotationEnvironment.java 2008-05-30 10:18:45 UTC (rev 73833)
@@ -35,6 +35,7 @@
import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
import org.jboss.deployers.spi.annotations.Element;
+import org.jboss.logging.Logger;
import org.jboss.metadata.spi.signature.Signature;
import org.jboss.util.collection.CollectionsFactory;
@@ -45,6 +46,9 @@
*/
public class DefaultAnnotationEnvironment extends WeakClassLoaderHolder implements AnnotationEnvironment
{
+ /** The log */
+ private static final Logger log = Logger.getLogger(DefaultAnnotationEnvironment.class);
+ /** The info map */
private Map<Class<? extends Annotation>, Map<ElementType, Set<ClassSignaturePair>>> env;
public DefaultAnnotationEnvironment(ClassLoader classLoader)
@@ -63,6 +67,9 @@
*/
void putAnnotation(Class<? extends Annotation> annClass, ElementType type, String className, Signature signature)
{
+ if (log.isTraceEnabled())
+ log.trace("Adding annotation @" + annClass.getSimpleName() + " for " + className + " at type " + type + ", signature: " + signature);
+
Map<ElementType, Set<ClassSignaturePair>> elements = env.get(annClass);
if (elements == null)
{
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java 2008-05-30 09:58:02 UTC (rev 73832)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java 2008-05-30 10:18:45 UTC (rev 73833)
@@ -56,6 +56,9 @@
public void deploy(DeploymentUnit unit, Module module) throws DeploymentException
{
+ if (log.isTraceEnabled())
+ log.trace("Creating AnnotationEnvironment for " + unit + ", module: " + module + ", force annotations: " + forceAnnotations);
+
ClassPool pool = ClassPool.getDefault();
ClassLoader classLoader = unit.getClassLoader();
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java 2008-05-30 09:58:02 UTC (rev 73832)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java 2008-05-30 10:18:45 UTC (rev 73833)
@@ -125,6 +125,9 @@
*/
protected void handleCtClass(CtClass ctClass, ResourceContext resource) throws ClassNotFoundException, NotFoundException
{
+ if (log.isTraceEnabled())
+ log.trace("Scanning class " + ctClass + " for annotations, resource url: " + resource.getUrl());
+
Object[] annotations = forceAnnotations ? ctClass.getAnnotations() : ctClass.getAvailableAnnotations();
handleAnnotations(ElementType.TYPE, (Signature)null, annotations, resource);
handleCtMembers(ElementType.CONSTRUCTOR, ctClass.getDeclaredConstructors(), resource);
More information about the jboss-cvs-commits
mailing list