com.amazon.carbonado.info
Class StorableIntrospector

java.lang.Object
  extended by com.amazon.carbonado.info.StorableIntrospector
Direct Known Subclasses:
JDBCStorableIntrospector

public class StorableIntrospector
extends Object

Supports examination of Storable types, returning all metadata associated with it. As part of the examination, all annotations are gathered up. All examined data is cached, so repeat examinations are fast, unless the examination failed.

Author:
Brian S O'Neill, Fang Chen, Tobias Holgers

Constructor Summary
StorableIntrospector()
           
 
Method Summary
static
<S extends Storable>
StorableInfo<S>
examine(Class<S> type)
          Examines the given class and returns a StorableInfo describing it.
static Class<? extends Storable> inferType(Class clazz)
          Examines a class and determines what Storable type it implements.
static void main(String[] args)
          Test program which examines candidate Storable classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorableIntrospector

public StorableIntrospector()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Test program which examines candidate Storable classes. If any fail, an exception is thrown.

Parameters:
args - names of classes to examine
Throws:
Exception

examine

public static <S extends Storable> StorableInfo<S> examine(Class<S> type)
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.

Parameters:
type - Storable type to examine
Throws:
MalformedTypeException - if Storable type is invalid
IllegalArgumentException - if type is null

inferType

public static Class<? extends Storable> inferType(Class clazz)
Examines a class and determines what Storable type it implements. If it cannot be unambiguously inferred, null is returned. A non-null return value does not imply that the Storable type is valid, however. It must be examined to check validity.

Since:
1.2


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.