incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apope...@apache.org
Subject svn commit: r376133 - /incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java
Date Thu, 09 Feb 2006 00:45:25 GMT
Author: apopescu
Date: Wed Feb  8 16:45:23 2006
New Revision: 376133

URL: http://svn.apache.org/viewcvs?rev=376133&view=rev
Log:
add forName() utility method

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java?rev=376133&r1=376132&r2=376133&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/reflection/ReflectionUtils.java
Wed Feb  8 16:45:23 2006
@@ -124,4 +124,17 @@
                     ex);
         }
     }
+
+    /**
+     * @param elementClassName
+     * @return
+     */
+    public static Class forName(String clazz) {
+        try {
+            return Class.forName(clazz);
+        }
+        catch(Exception ex) {
+            throw new JcrMappingException("Cannot load class " + clazz, ex);
+        }
+    }
 }



Mime
View raw message