org.openstreetmap.osmosis.core.store
Class StoreableConstructorCache

java.lang.Object
  extended by org.openstreetmap.osmosis.core.store.StoreableConstructorCache

public class StoreableConstructorCache
extends java.lang.Object

Provides a cache mapping between classes and storeable constructors. A storeable constructor is a constructor accepting a StoreReader and StoreClassRegister as arguments. This class uses reflection to obtain the required constructor and is suitable for validating classes being written to a store as well as obtaining suitable constructors when reading from a store.

Author:
Brett Henderson

Constructor Summary
StoreableConstructorCache()
          Creates a new instance.
 
Method Summary
 java.lang.reflect.Constructor<?> getStoreableConstructor(java.lang.Class<?> clazz)
          Returns the constructor on the specified class that is used for loading state from a data store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreableConstructorCache

public StoreableConstructorCache()
Creates a new instance.

Method Detail

getStoreableConstructor

public java.lang.reflect.Constructor<?> getStoreableConstructor(java.lang.Class<?> clazz)
Returns the constructor on the specified class that is used for loading state from a data store.

Parameters:
clazz - The class with the storeable constructor.
Returns:
The storeable class constructor.