diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2008-12-26 00:41:27 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2008-12-26 00:41:27 +0000 |
commit | daf5eadcdba26f37a958ed943e6fde06ce645972 (patch) | |
tree | 205d6406fd11a88aa2d7a4a72be6b4cb9fdbaaa4 /src | |
parent | 9d219c6af6ce718a282a00fd2a93dc0e08ccf548 (diff) |
Added command-line introspector.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java index bd1d52b..5bcce2f 100644 --- a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java +++ b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java @@ -89,6 +89,21 @@ public class StorableIntrospector { private static Map<Class<?>, Reference<StorableInfo<?>>> cCache = new WeakIdentityMap();
/**
+ * Test program which examines candidate Storable classes. If any fail, an
+ * exception is thrown.
+ *
+ * @param args names of classes to examine
+ * @throws MalformedTypeException if Storable type is invalid
+ */
+ public static void main(String[] args) throws Exception {
+ for (String arg : args) {
+ Class clazz = Class.forName(arg);
+ System.out.println("Examining " + clazz.getName());
+ examine(clazz);
+ }
+ }
+
+ /**
* Examines the given class and returns a StorableInfo describing it. A
* MalformedTypeException is thrown for a variety of reasons if the given
* class is an invalid Storable type.
|