[jboss-cvs] JBossAS SVN: r75886 - 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
Wed Jul 16 06:12:17 EDT 2008
Author: alesj
Date: 2008-07-16 06:12:16 -0400 (Wed, 16 Jul 2008)
New Revision: 75886
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java
Log:
Expose GARV creation.
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-07-16 10:06:58 UTC (rev 75885)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java 2008-07-16 10:12:16 UTC (rev 75886)
@@ -66,6 +66,24 @@
this.keepAnnotations = keepAnnotations;
}
+ /**
+ * Create GenericAnnotationResourceVisitor.
+ *
+ * Can be used change existing GARV's filter.
+ * Or determin if we need to force/keep annotations.
+ *
+ * @param pool the class pool
+ * @param classLoader the classloader
+ * @return new generic annotation visitor
+ */
+ protected GenericAnnotationResourceVisitor createGenericAnnotationResourceVisitor(ClassPool pool, ClassLoader classLoader)
+ {
+ GenericAnnotationResourceVisitor visitor = new GenericAnnotationResourceVisitor(pool, classLoader);
+ visitor.setForceAnnotations(forceAnnotations);
+ visitor.setKeepAnnotations(keepAnnotations);
+ return visitor;
+ }
+
public void deploy(DeploymentUnit unit, Module module) throws DeploymentException
{
if (log.isTraceEnabled())
@@ -73,11 +91,8 @@
ClassPool pool = ClassPool.getDefault();
ClassLoader classLoader = unit.getClassLoader();
+ GenericAnnotationResourceVisitor visitor = createGenericAnnotationResourceVisitor(pool, classLoader);
- GenericAnnotationResourceVisitor visitor = new GenericAnnotationResourceVisitor(pool, classLoader);
- visitor.setForceAnnotations(forceAnnotations);
- visitor.setKeepAnnotations(keepAnnotations);
-
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(classLoader);
try
More information about the jboss-cvs-commits
mailing list