User: mulder
Date: 00/07/28 07:00:49
Modified: src/main/org/jboss/metadata BeanMetaData.java
MetaDataFactory.java MethodMetaData.java
Log:
Change metadata to use Strings instead of Classes.
Prevents icky ClassNotFoundExceptions and NoClassDefFoundErrors.
Added convenience methods that take Classes and convert them to Strings.
Revision Changes Path
1.3 +20 -2 jboss/src/main/org/jboss/metadata/BeanMetaData.java
Index: BeanMetaData.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/metadata/BeanMetaData.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BeanMetaData.java 2000/07/07 23:47:46 1.2
+++ BeanMetaData.java 2000/07/28 14:00:48 1.3
@@ -16,16 +16,34 @@
public interface BeanMetaData extends MetaData {
/**
* Gets the metadata for a method of this bean. The method is identified
- * by its name and arguments.
+ * by its name and argument class names.
* @throws java.lang.IllegalArgumentException
* Occurs when no method with the specified name and arguments can be
* found.
*/
+ public MethodMetaData getMethod(String name, String[] args);
+
+ /**
+ * Gets the metadata for a method of this bean. The method is identified
+ * by its name and argument classes.
+ * @throws java.lang.IllegalArgumentException
+ * Occurs when no method with the specified name and arguments can be
+ * found.
+ */
public MethodMetaData getMethod(String name, Class[] args);
/**
+ * Gets the metadata for a method of this bean's home interface. The
+ * method is identified by its name and argument class names.
+ * @throws java.lang.IllegalArgumentException
+ * Occurs when no method with the specified name and arguments can be
+ * found.
+ */
+ public MethodMetaData getHomeMethod(String name, String[] args);
+
+ /**
* Gets the metadata for a method of this bean's home interface. The
- * method is identified by its name and arguments.
+ * method is identified by its name and argument classes.
* @throws java.lang.IllegalArgumentException
* Occurs when no method with the specified name and arguments can be
* found.
1.3 +4 -4 jboss/src/main/org/jboss/metadata/MetaDataFactory.java
Index: MetaDataFactory.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/metadata/MetaDataFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MetaDataFactory.java 2000/07/07 23:47:47 1.2
+++ MetaDataFactory.java 2000/07/28 14:00:48 1.3
@@ -110,10 +110,10 @@
while(itm.hasNext()) {
MethodMetaData mmd = (MethodMetaData)itm.next();
System.out.print(" Method '"+mmd.getName()+"(");
- Class[] args = mmd.getParameterTypes();
+ String[] args = mmd.getParameterTypes();
for(int i=0; i<args.length; i++) {
if(i > 0) System.out.print(", ");
- System.out.print(args[i].getName());
+ System.out.print(args[i]);
}
System.out.println(")'");
dumpMetaData(" ", mmd);
@@ -125,10 +125,10 @@
while(itm.hasNext()) {
MethodMetaData mmd = (MethodMetaData)itm.next();
System.out.print(" Home Method '"+mmd.getName()+"(");
- Class[] args = mmd.getParameterTypes();
+ String[] args = mmd.getParameterTypes();
for(int i=0; i<args.length; i++) {
if(i > 0) System.out.print(", ");
- System.out.print(args[i].getName());
+ System.out.print(args[i]);
}
System.out.println(")'");
dumpMetaData(" ", mmd);
1.3 +4 -3 jboss/src/main/org/jboss/metadata/MethodMetaData.java
Index: MethodMetaData.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/metadata/MethodMetaData.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MethodMetaData.java 2000/07/07 23:47:47 1.2
+++ MethodMetaData.java 2000/07/28 14:00:48 1.3
@@ -17,8 +17,9 @@
public String getName();
/**
- * Gets the parameter types of this method. The name and parameter class
- * types of a method together are the unique identifier.
+ * Gets the names of the classes of the parameter types of this method.
+ * The name and parameter class types of a method together are the
+ * unique identifier.
*/
- public Class[] getParameterTypes();
+ public String[] getParameterTypes();
}