From daf5eadcdba26f37a958ed943e6fde06ce645972 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 26 Dec 2008 00:41:27 +0000 Subject: Added command-line introspector. --- .../com/amazon/carbonado/info/StorableIntrospector.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main') 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 @@ -88,6 +88,21 @@ public class StorableIntrospector { @SuppressWarnings("unchecked") private static Map, Reference>> 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 -- cgit v1.2.3