de.uni_paderborn.tools.fsa
Class FSATypeConverterCache

java.lang.Object
  extended byde.uni_paderborn.tools.fsa.FSATypeConverterCache

public class FSATypeConverterCache
extends java.lang.Object

cache "converter" methods from sourcetype to targettype

Version:
$Revision: 1.23 $
Author:
$Author: schneider $

Field Summary
static java.lang.String DEFAULT_CONVERTER_METHOD
          No comment provided by developer, please add a comment to improve documentation.
private  java.util.TreeMap methodCache
          methodCache : TreeMap (,[]) key:String = .getName():.getName()[:] method = public static ( , )
private static FSATypeConverterCache theInstance
          the Singleton instance
 
Constructor Summary
private FSATypeConverterCache()
          Default private Constructor
 
Method Summary
private  void addToMethodCache(java.lang.String key, java.lang.reflect.Method[] elem)
           
 java.lang.String createMethodCacheKey(java.lang.Class sourceClass, java.lang.Class targetClass)
          compute key for methodCache
 java.lang.String createMethodCacheKey(java.lang.Class sourceClass, java.lang.Class targetClass, java.lang.String methodName)
          compute key for methodCache
private  java.util.Iterator entriesOfMethodCache()
           
private  java.lang.reflect.Method[] findConverterMethod(java.lang.Class sourceClass, java.lang.Class targetClass, java.lang.String methodName)
          No comment provided by developer, please add a comment to improve documentation.
private  java.lang.reflect.Method[] findConverterMethods(java.lang.Class sourceClass, java.lang.Class targetClass)
          No comment provided by developer, please add a comment to improve documentation.
static FSATypeConverterCache get()
          get the Singleton instance
 java.lang.reflect.Method[] getConverterMethods(java.lang.Class sourceClass, java.lang.Class targetClass)
          get all static methods from FSATypeConverterCache with result= and parameter=
 java.lang.reflect.Method getDefaultConverterMethods(java.lang.Class sourceClass, java.lang.Class targetClass)
          get default converter method
<[sourceClass.name]To[targetClass.name]> ( )
private  java.lang.reflect.Method[] getFromMethodCache(java.lang.String key)
           
private  boolean hasKeyInMethodCache(java.lang.String key)
           
private  java.util.Iterator iteratorOfMethodCache()
           
private  java.util.Iterator keysOfMethodCache()
           
private  void removeAllFromMethodCache()
           
private  void removeKeyFromMethodCache(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONVERTER_METHOD

public static final java.lang.String DEFAULT_CONVERTER_METHOD
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

theInstance

private static FSATypeConverterCache theInstance
the Singleton instance


methodCache

private java.util.TreeMap methodCache
methodCache : TreeMap (,[])

key:String = .getName():.getName()[:] method = public static ( , )

Constructor Detail

FSATypeConverterCache

private FSATypeConverterCache()
Default private Constructor

Method Detail

get

public static FSATypeConverterCache get()
get the Singleton instance

Returns:
the Singleton instance

findConverterMethod

private java.lang.reflect.Method[] findConverterMethod(java.lang.Class sourceClass,
                                                       java.lang.Class targetClass,
                                                       java.lang.String methodName)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
sourceClass - No description provided
targetClass - No description provided
methodName - No description provided
Returns:
No description provided

findConverterMethods

private java.lang.reflect.Method[] findConverterMethods(java.lang.Class sourceClass,
                                                        java.lang.Class targetClass)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
sourceClass - No description provided
targetClass - No description provided
Returns:
No description provided

getDefaultConverterMethods

public java.lang.reflect.Method getDefaultConverterMethods(java.lang.Class sourceClass,
                                                           java.lang.Class targetClass)
get default converter method
<[sourceClass.name]To[targetClass.name]> ( )

Parameters:
targetClass - the target/result class
sourceClass - the source/parameter class
Returns:
the default method which converts to

getConverterMethods

public java.lang.reflect.Method[] getConverterMethods(java.lang.Class sourceClass,
                                                      java.lang.Class targetClass)
get all static methods from FSATypeConverterCache with result= and parameter=

Parameters:
targetClass - the target/result class
sourceClass - the source/parameter class
Returns:
all static method from FSATypeConverterCache aMethodName ( )

createMethodCacheKey

public java.lang.String createMethodCacheKey(java.lang.Class sourceClass,
                                             java.lang.Class targetClass,
                                             java.lang.String methodName)
compute key for methodCache

Parameters:
methodName - the methodname
targetClass - the target Class
sourceClass - the source Class
Returns:
the key

createMethodCacheKey

public java.lang.String createMethodCacheKey(java.lang.Class sourceClass,
                                             java.lang.Class targetClass)
compute key for methodCache

Parameters:
targetClass - the target Class
sourceClass - the source Class
Returns:
the key

hasKeyInMethodCache

private boolean hasKeyInMethodCache(java.lang.String key)
Parameters:
key - No description provided
Returns:
No description provided
See Also:
methodCache

iteratorOfMethodCache

private java.util.Iterator iteratorOfMethodCache()
Returns:
No description provided
See Also:
methodCache

keysOfMethodCache

private java.util.Iterator keysOfMethodCache()
Returns:
No description provided
See Also:
methodCache

entriesOfMethodCache

private java.util.Iterator entriesOfMethodCache()
Returns:
No description provided
See Also:
methodCache

getFromMethodCache

private java.lang.reflect.Method[] getFromMethodCache(java.lang.String key)
Parameters:
key - No description provided
Returns:
The fromMethodCache value
See Also:
methodCache

addToMethodCache

private void addToMethodCache(java.lang.String key,
                              java.lang.reflect.Method[] elem)
Parameters:
key - The object added.
elem - The object added.
See Also:
methodCache

removeKeyFromMethodCache

private void removeKeyFromMethodCache(java.lang.String key)
Parameters:
key - No description provided
See Also:
methodCache

removeAllFromMethodCache

private void removeAllFromMethodCache()
See Also:
methodCache