[jboss-cvs] jboss-seam/src/main/org/jboss/seam/util ...
Peter Muir
peter at bleepbleep.org.uk
Mon Aug 13 10:20:34 EDT 2007
User: pmuir
Date: 07/08/13 10:20:34
Modified: src/main/org/jboss/seam/util Reflections.java
Log:
JBSEAM-1787
Revision Changes Path
1.22 +16 -1 jboss-seam/src/main/org/jboss/seam/util/Reflections.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Reflections.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/util/Reflections.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- Reflections.java 16 May 2007 15:46:57 -0000 1.21
+++ Reflections.java 13 Aug 2007 14:20:34 -0000 1.22
@@ -1,4 +1,4 @@
-//$Id: Reflections.java,v 1.21 2007/05/16 15:46:57 gavin Exp $
+//$Id: Reflections.java,v 1.22 2007/08/13 14:20:34 pmuir Exp $
package org.jboss.seam.util;
import java.beans.Introspector;
@@ -165,6 +165,21 @@
}
}
+ /**
+ * Return's true if the class can be loaded using Reflections.classForName()
+ */
+ public static boolean isClassAvailable(String name)
+ {
+ try
+ {
+ classForName(name);
+ }
+ catch (ClassNotFoundException e) {
+ return false;
+ }
+ return true;
+ }
+
public static Class getCollectionElementType(Type collectionType)
{
if ( !(collectionType instanceof ParameterizedType) )
More information about the jboss-cvs-commits
mailing list