Java Doc for Converter.java in  » Web-Services » crispy » net » sf » crispy » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services » crispy » net.sf.crispy.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.crispy.util.Converter

Converter
public class Converter (Code)
Convert complex object in a simple form and back to the object.
author:
   Linke


Field Summary
final public static  intGET_METHOD
    
final public static  StringHASH_CODE_KEY
    
final public static  intSET_METHOD
    
final protected static  ClassPropertiesCacheclassPropertiesCacheGetter
    
final protected static  ClassPropertiesCacheclassPropertiesCacheSetter
    
final protected static  MapisSimpleDataType
    
final protected static  Loglog
    

Constructor Summary
public  Converter()
    
public  Converter(String pvNullValue)
    
public  Converter(int pvStartHashCode)
    

Method Summary
public static  ObjectconvertClassString2Object(String pvClassName)
    
public static  ObjectconvertString2Value(String pvStringValue, String pvClassName)
     For example String to Integer or String to Date, ...
Parameters:
  pvStringValue - Value in String class.
Parameters:
  pvClassName - Class name to convert the String value.
public static  ObjectconvertString2Value(Object pvValue, Class pvClass)
    
public static  ObjectconvertString2Value(String pvStringValue, Class pvClass)
     For example String to Integer or String to Date, ...
Parameters:
  pvStringValue - Value in String class.
Parameters:
  pvClass - Type to convert the String value.
public static  Object[]convertStringParams2MethodParams(Method pvMethod, Vector pvParams)
     Convert String-Parameter (contains in the Vector) in Method-ParameterTypes. For example: Vector ["5", "8"] convert to new Integer [] { new Integer(5), new Integer (8) }
Parameters:
  pvMethod - Method with ParameterTypes.
Parameters:
  pvParams - Vector with Strings.
public static  ObjectcreateDefaultValueForPrimitiveClass(Class pvClass)
    
public static  ObjectcreateObjectWithParamConstructor(Object pvParam, Class pvParamType, String pvClassName)
    
public static  StringextractHashCode(Object pvObject)
     If pvObject.toString - method start with Converter.HASH_CODE_KEY, then extract the hash code.
public  StringfindNextFreeId(int pvHashCode)
    
public static  MapgetAllGetterAndSetterMethod(Class pvClass, int pvMethodType)
    
public static  MapgetAllGetterMethod(Class pvClass)
     Find all getter-method from a Class.
Parameters:
  pvClass - Class to analyse.
public static  MapgetAllGetterMethodWithCache(Class pvClass)
     Find all getter-method from a Class and remove all getter-method where no setter-method exist.
Parameters:
  pvClass - Class to anaylse.
public static  Method[]getAllMethodsByClass(Class pvClass)
     Get all set/get methods from a Class.
public static  MapgetAllNotEqualsGetterAndSetterAndRemoveThisProperties(Map pvGetterMap, Map pvSetterMap)
     Remove all getter-method where no setter-method exist.
public static  MapgetAllSetterMethod(Class pvClass)
     Find all setter-method from a Class.
Parameters:
  pvClass - Class to analyse.
public static  MapgetAllSetterMethodWithCache(Class pvClass)
     Find all setter-method from a Class.
Parameters:
  pvClass - Class to analyse.
public static  ClassgetArrayType(Object pvListObj)
     Analysed the objects in an Array/Collection.
public static  StringgetClassWithoutPackage(String pvClassWitchPackage, boolean pvToLowerCase)
     Extract from package + class name, the class name.
public  StringgetNullValue()
    
public  booleangetWithSimpleKeyMapper()
    
public static  booleanisValideEdge(Object pvObject)
    
public static  ObjectmakeAssignable(Class pvSourceClass, Object pvValue)
    
public  ObjectmakeComplex(Object pvObject)
    
public  ObjectmakeComplex(Object pvObject, Class clazz)
    
public  ObjectmakeComplex(Object pvObject, Class clazz, Class clazzInArray)
    
public  ObjectmakeSimple(Object pvObject)
     Convert complex object in a Hashtable and relations in Vector. Cycles are finded and removed.
Parameters:
  pvObject - Complex or simple object.
public  voidsetNullValue(String pvNullValue)
    
public  voidsetWithSimpleKeyMapper(boolean pvWithSimpleKeyMapper)
    
public static  Datestring2Date(String pvDateString)
     Convert a Date-String to a Date.

Field Detail
GET_METHOD
final public static int GET_METHOD(Code)



HASH_CODE_KEY
final public static String HASH_CODE_KEY(Code)



SET_METHOD
final public static int SET_METHOD(Code)



classPropertiesCacheGetter
final protected static ClassPropertiesCache classPropertiesCacheGetter(Code)



classPropertiesCacheSetter
final protected static ClassPropertiesCache classPropertiesCacheSetter(Code)



isSimpleDataType
final protected static Map isSimpleDataType(Code)



log
final protected static Log log(Code)




Constructor Detail
Converter
public Converter()(Code)



Converter
public Converter(String pvNullValue)(Code)



Converter
public Converter(int pvStartHashCode)(Code)




Method Detail
convertClassString2Object
public static Object convertClassString2Object(String pvClassName) throws Exception(Code)



convertString2Value
public static Object convertString2Value(String pvStringValue, String pvClassName) throws Exception(Code)
For example String to Integer or String to Date, ...
Parameters:
  pvStringValue - Value in String class.
Parameters:
  pvClassName - Class name to convert the String value. The converted String value.



convertString2Value
public static Object convertString2Value(Object pvValue, Class pvClass)(Code)



convertString2Value
public static Object convertString2Value(String pvStringValue, Class pvClass)(Code)
For example String to Integer or String to Date, ...
Parameters:
  pvStringValue - Value in String class.
Parameters:
  pvClass - Type to convert the String value. The converted String value.



convertStringParams2MethodParams
public static Object[] convertStringParams2MethodParams(Method pvMethod, Vector pvParams)(Code)
Convert String-Parameter (contains in the Vector) in Method-ParameterTypes. For example: Vector ["5", "8"] convert to new Integer [] { new Integer(5), new Integer (8) }
Parameters:
  pvMethod - Method with ParameterTypes.
Parameters:
  pvParams - Vector with Strings. Array with ParameterTypes and ParameterValues.



createDefaultValueForPrimitiveClass
public static Object createDefaultValueForPrimitiveClass(Class pvClass)(Code)



createObjectWithParamConstructor
public static Object createObjectWithParamConstructor(Object pvParam, Class pvParamType, String pvClassName)(Code)



extractHashCode
public static String extractHashCode(Object pvObject)(Code)
If pvObject.toString - method start with Converter.HASH_CODE_KEY, then extract the hash code. Example: make from ~hashCode~24306761 to 24306761.
Parameters:
  pvObject - The hash code.



findNextFreeId
public String findNextFreeId(int pvHashCode)(Code)



getAllGetterAndSetterMethod
public static Map getAllGetterAndSetterMethod(Class pvClass, int pvMethodType) throws IntrospectionException(Code)

Parameters:
  pvClass - Find all get or set method from a Class.
Parameters:
  pvMethodType - get or set Method map (key=property name, value=method).
throws:
  IntrospectionException -



getAllGetterMethod
public static Map getAllGetterMethod(Class pvClass) throws IntrospectionException(Code)
Find all getter-method from a Class.
Parameters:
  pvClass - Class to analyse. Map all getter-Method (key=property name, value=method).
throws:
  IntrospectionException -



getAllGetterMethodWithCache
public static Map getAllGetterMethodWithCache(Class pvClass) throws IntrospectionException(Code)
Find all getter-method from a Class and remove all getter-method where no setter-method exist.
Parameters:
  pvClass - Class to anaylse. Map from getter-method (key=property name, value=method).
throws:
  IntrospectionException -



getAllMethodsByClass
public static Method[] getAllMethodsByClass(Class pvClass)(Code)
Get all set/get methods from a Class. With methods from all super classes.
Parameters:
  pvClass - Analyse Class. All finded methods.



getAllNotEqualsGetterAndSetterAndRemoveThisProperties
public static Map getAllNotEqualsGetterAndSetterAndRemoveThisProperties(Map pvGetterMap, Map pvSetterMap)(Code)
Remove all getter-method where no setter-method exist.



getAllSetterMethod
public static Map getAllSetterMethod(Class pvClass) throws IntrospectionException(Code)
Find all setter-method from a Class.
Parameters:
  pvClass - Class to analyse. Map all setter-Method (key=property name, value=method).
throws:
  IntrospectionException -



getAllSetterMethodWithCache
public static Map getAllSetterMethodWithCache(Class pvClass) throws IntrospectionException(Code)
Find all setter-method from a Class.
Parameters:
  pvClass - Class to analyse. Map all setter-Method (key=property name, value=method).
throws:
  IntrospectionException -



getArrayType
public static Class getArrayType(Object pvListObj)(Code)
Analysed the objects in an Array/Collection. If all Object from the same class type, then is the return value this class. If are several class types in the Array, then ist the return class from type Object.
Parameters:
  pvListObj - Class, that are in the Array or Collection



getClassWithoutPackage
public static String getClassWithoutPackage(String pvClassWitchPackage, boolean pvToLowerCase)(Code)
Extract from package + class name, the class name. Example (pvToLowerCase = false)): Input: net.sf.crispy.ServiceManager -> Output: ServiceManger. Example (pvToLowerCase = true)): Input: net.sf.crispy.ServiceManager -> Output: servicemanger.
Parameters:
  pvClassWitchPackage -
Parameters:
  pvToLowerCase - The class without package.



getNullValue
public String getNullValue()(Code)



getWithSimpleKeyMapper
public boolean getWithSimpleKeyMapper()(Code)



isValideEdge
public static boolean isValideEdge(Object pvObject)(Code)



makeAssignable
public static Object makeAssignable(Class pvSourceClass, Object pvValue)(Code)



makeComplex
public Object makeComplex(Object pvObject) throws Exception(Code)



makeComplex
public Object makeComplex(Object pvObject, Class clazz) throws Exception(Code)



makeComplex
public Object makeComplex(Object pvObject, Class clazz, Class clazzInArray) throws Exception(Code)



makeSimple
public Object makeSimple(Object pvObject) throws Exception(Code)
Convert complex object in a Hashtable and relations in Vector. Cycles are finded and removed.
Parameters:
  pvObject - Complex or simple object. Simple object structure.
throws:
  Exception -



setNullValue
public void setNullValue(String pvNullValue)(Code)



setWithSimpleKeyMapper
public void setWithSimpleKeyMapper(boolean pvWithSimpleKeyMapper)(Code)



string2Date
public static Date string2Date(String pvDateString)(Code)
Convert a Date-String to a Date. The Converter neglected the Millisecond. Example: Thu Aug 11 19:30:57 CEST 2005
Parameters:
  pvDateString - The Date-String (unequal null). Valid java.util.Date.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.