[jboss-cvs] jboss-seam/src/main/org/jboss/seam/deployment ...
Gavin King
gavin.king at jboss.com
Thu Nov 9 02:24:52 EST 2006
User: gavin
Date: 06/11/09 02:24:52
Modified: src/main/org/jboss/seam/deployment Scanner.java
Log:
support fine-grained component.xml files
Revision Changes Path
1.15 +9 -3 jboss-seam/src/main/org/jboss/seam/deployment/Scanner.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Scanner.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/deployment/Scanner.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- Scanner.java 27 Oct 2006 12:58:09 -0000 1.14
+++ Scanner.java 9 Nov 2006 07:24:52 -0000 1.15
@@ -1,4 +1,4 @@
-//$Id: Scanner.java,v 1.14 2006/10/27 12:58:09 gavin Exp $
+//$Id: Scanner.java,v 1.15 2006/11/09 07:24:52 gavin Exp $
package org.jboss.seam.deployment;
import java.io.DataInputStream;
@@ -144,10 +144,11 @@
)
{
String classname = filenameToClassname(name);
+ String filename = Scanner.componentFilename(name);
try
{
ClassFile classFile = getClassFile(name);
- if ( hasAnnotation(classFile, Name.class) )
+ if ( hasAnnotation(classFile, Name.class) || classLoader.getResources(filename).hasMoreElements() )
{
result.add( (Class<Object>) classLoader.loadClass(classname) );
}
@@ -193,4 +194,9 @@
return false;
}
+ public static String componentFilename(String name)
+ {
+ return name.substring( 0, name.lastIndexOf(".class") ) + ".component.xml";
+ }
+
}
More information about the jboss-cvs-commits
mailing list