[jboss-cvs] JBossAS SVN: r95340 - projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 21 16:25:46 EDT 2009
Author: alesj
Date: 2009-10-21 16:25:46 -0400 (Wed, 21 Oct 2009)
New Revision: 95340
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java
Log:
Add type info provider.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java 2009-10-21 20:25:18 UTC (rev 95339)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/annotations/GenericAnnotationDeployer.java 2009-10-21 20:25:46 UTC (rev 95340)
@@ -27,6 +27,7 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.repository.TypeInfoProvider;
import org.jboss.mcann.scanner.DefaultAnnotationScanner;
import org.jboss.mcann.scanner.ModuleAnnotationScanner;
@@ -39,7 +40,9 @@
{
private boolean forceAnnotations;
private boolean keepAnnotations;
+ private boolean checkSuper;
private boolean checkInterfaces;
+ private TypeInfoProvider typeInfoProvider;
public GenericAnnotationDeployer()
{
@@ -70,6 +73,16 @@
}
/**
+ * Should we check super for annotations as well.
+ *
+ * @param checkSuper the check super flag
+ */
+ public void setCheckSuper(boolean checkSuper)
+ {
+ this.checkSuper = checkSuper;
+ }
+
+ /**
* Should we check interfaces for annotations as well.
*
* @param checkInterfaces the check interfaces flag
@@ -79,6 +92,16 @@
this.checkInterfaces = checkInterfaces;
}
+ /**
+ * Set type info provider.
+ *
+ * @param typeInfoProvider the type info provider
+ */
+ public void setTypeInfoProvider(TypeInfoProvider typeInfoProvider)
+ {
+ this.typeInfoProvider = typeInfoProvider;
+ }
+
public void deploy(DeploymentUnit unit, Module deployment) throws DeploymentException
{
try
@@ -86,7 +109,11 @@
DefaultAnnotationScanner scanner = new ModuleAnnotationScanner(deployment);
scanner.setForceAnnotations(forceAnnotations);
scanner.setKeepAnnotations(keepAnnotations);
+ scanner.setCheckSuper(checkSuper);
scanner.setCheckInterfaces(checkInterfaces);
+ if (typeInfoProvider != null)
+ scanner.setTypeInfoProvider(typeInfoProvider);
+
AnnotationRepository repository = scanner.scan(unit.getClassLoader());
unit.addAttachment(AnnotationRepository.class, repository);
}
More information about the jboss-cvs-commits
mailing list