net.sourceforge.jparam.typename
Class TypeNameRegistry

java.lang.Object
  |
  +--net.sourceforge.jparam.typename.TypeNameRegistry

public class TypeNameRegistry
extends java.lang.Object

This registry holds a mapping between JParam type names and Java types

Author:
ron_sidi

Method Summary
static void clearSingleton()
           
static TypeNameRegistry getInstance()
           
 java.lang.Class getJavaType(java.lang.String _jparamTypeName)
          Return the Java Class represented by the given JParam type name All const, '*', '&' and template modifiers are ignored since they have no meaning in Java
 java.lang.String getJParamTypeName(java.lang.Class type)
          Get the JParam type name for the given Java Class
 void registerJavaToJParam(java.lang.Class t, java.lang.String jparamTypeName)
          Register the given Java Class to the given type name, again this is needed for multi mapping like the case of registering internal Java types such as Object and Number that have no JParam representation
 void registerJParamAndJava(java.lang.Class t, java.lang.String jparamTypeName)
          Register a bidirectional mapping between the given Java Class and the given JParam type name
 void registerJParamToJava(java.lang.String jparamTypeName, java.lang.Class t)
          Register a mapping from the given JParam type name to the given Java Class, this is needed in order to support multi-mapping for instance for registering both "long" and "int" as the Integer Java Class
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TypeNameRegistry getInstance()

getJavaType

public java.lang.Class getJavaType(java.lang.String _jparamTypeName)
                            throws JParamException
Return the Java Class represented by the given JParam type name All const, '*', '&' and template modifiers are ignored since they have no meaning in Java
Parameters:
_jparamTypeName -  
Returns:
@throws JParamException

getJParamTypeName

public java.lang.String getJParamTypeName(java.lang.Class type)
                                   throws JParamException
Get the JParam type name for the given Java Class
Parameters:
type -  
Returns:
@throws JParamException

registerJParamAndJava

public void registerJParamAndJava(java.lang.Class t,
                                  java.lang.String jparamTypeName)
Register a bidirectional mapping between the given Java Class and the given JParam type name
Parameters:
t -  
jparamTypeName -  

registerJParamToJava

public void registerJParamToJava(java.lang.String jparamTypeName,
                                 java.lang.Class t)
Register a mapping from the given JParam type name to the given Java Class, this is needed in order to support multi-mapping for instance for registering both "long" and "int" as the Integer Java Class
Parameters:
jparamTypeName -  
t -  

registerJavaToJParam

public void registerJavaToJParam(java.lang.Class t,
                                 java.lang.String jparamTypeName)
Register the given Java Class to the given type name, again this is needed for multi mapping like the case of registering internal Java types such as Object and Number that have no JParam representation
Parameters:
t -  
jparamTypeName -  

clearSingleton

public static void clearSingleton()


Copyright © 2004 SourceForge. All Rights Reserved.