Java Doc for ConvertUtils.java in  » Library » Apache-commons-beanutils-1.8.0-BETA-src » org » apache » commons » beanutils » 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 » Library » Apache commons beanutils 1.8.0 BETA src » org.apache.commons.beanutils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.beanutils.ConvertUtils

ConvertUtils
public class ConvertUtils (Code)

Utility methods for converting String scalar values to objects of the specified Class, String arrays to arrays of the specified Class.

For more details, see ConvertUtilsBean which provides the implementations for these methods.


author:
   Craig R. McClanahan
author:
   Ralph Schaer
author:
   Chris Audley
version:
   $Revision: 556229 $ $Date: 2007-07-14 07:11:19 +0100 (Sat, 14 Jul 2007) $
See Also:   ConvertUtilsBean




Method Summary
public static  Stringconvert(Object value)
    
public static  Objectconvert(String value, Class clazz)
    

Convert the specified value to an object of the specified class (if possible).

public static  Objectconvert(String[] values, Class clazz)
    
public static  Objectconvert(Object value, Class targetType)
    
public static  voidderegister()
    
public static  voidderegister(Class clazz)
    
public static  booleangetDefaultBoolean()
     Gets the default value for Boolean conversions.
public static  bytegetDefaultByte()
     Gets the default value for Byte conversions.
public static  chargetDefaultCharacter()
     Gets the default value for Character conversions.
public static  doublegetDefaultDouble()
     Gets the default value for Double conversions.
public static  floatgetDefaultFloat()
     Get the default value for Float conversions.
public static  intgetDefaultInteger()
     Gets the default value for Integer conversions.
public static  longgetDefaultLong()
     Gets the default value for Long conversions.
public static  shortgetDefaultShort()
     Gets the default value for Short conversions.
public static  Converterlookup(Class clazz)
    
public static  Converterlookup(Class sourceType, Class targetType)
     Look up and return any registered Converter for the specified source and destination class; if there is no registered Converter, return null.
public static  voidregister(Converter converter, Class clazz)
    
public static  voidsetDefaultBoolean(boolean newDefaultBoolean)
     Sets the default value for Boolean conversions.
public static  voidsetDefaultByte(byte newDefaultByte)
     Sets the default value for Byte conversions.
public static  voidsetDefaultCharacter(char newDefaultCharacter)
     Sets the default value for Character conversions.
public static  voidsetDefaultDouble(double newDefaultDouble)
     Sets the default value for Double conversions.
public static  voidsetDefaultFloat(float newDefaultFloat)
     Sets the default value for Float conversions.
public static  voidsetDefaultInteger(int newDefaultInteger)
     Sets the default value for Integer conversions.
public static  voidsetDefaultLong(long newDefaultLong)
     Sets the default value for Long conversions.
public static  voidsetDefaultShort(short newDefaultShort)
     Sets the default value for Short conversions.



Method Detail
convert
public static String convert(Object value)(Code)

Convert the specified value into a String.

For more details see ConvertUtilsBean.


Parameters:
  value - Value to be converted (may be null) The converted String value
See Also:   ConvertUtilsBean.convert(Object)



convert
public static Object convert(String value, Class clazz)(Code)

Convert the specified value to an object of the specified class (if possible). Otherwise, return a String representation of the value.

For more details see ConvertUtilsBean.


Parameters:
  value - Value to be converted (may be null)
Parameters:
  clazz - Java class to be converted to The converted value
See Also:   ConvertUtilsBean.convert(StringClass)



convert
public static Object convert(String[] values, Class clazz)(Code)

Convert an array of specified values to an array of objects of the specified class (if possible).

For more details see ConvertUtilsBean.


Parameters:
  values - Array of values to be converted
Parameters:
  clazz - Java array or element class to be converted to The converted value
See Also:   ConvertUtilsBean.convert(String[]Class)



convert
public static Object convert(Object value, Class targetType)(Code)

Convert the value to an object of the specified class (if possible).


Parameters:
  value - Value to be converted (may be null)
Parameters:
  targetType - Class of the value to be converted to The converted value
exception:
  ConversionException - if thrown by an underlying Converter



deregister
public static void deregister()(Code)

Remove all registered Converter s, and re-establish the standard Converters.

For more details see ConvertUtilsBean.


See Also:   ConvertUtilsBean.deregister



deregister
public static void deregister(Class clazz)(Code)

Remove any registered Converter for the specified destination Class.

For more details see ConvertUtilsBean.


Parameters:
  clazz - Class for which to remove a registered Converter
See Also:   ConvertUtilsBean.deregister(Class)



getDefaultBoolean
public static boolean getDefaultBoolean()(Code)
Gets the default value for Boolean conversions. The default Boolean value



getDefaultByte
public static byte getDefaultByte()(Code)
Gets the default value for Byte conversions. The default Byte value



getDefaultCharacter
public static char getDefaultCharacter()(Code)
Gets the default value for Character conversions. The default Character value



getDefaultDouble
public static double getDefaultDouble()(Code)
Gets the default value for Double conversions. The default Double value



getDefaultFloat
public static float getDefaultFloat()(Code)
Get the default value for Float conversions. The default Float value



getDefaultInteger
public static int getDefaultInteger()(Code)
Gets the default value for Integer conversions. The default Integer value



getDefaultLong
public static long getDefaultLong()(Code)
Gets the default value for Long conversions. The default Long value



getDefaultShort
public static short getDefaultShort()(Code)
Gets the default value for Short conversions. The default Short value



lookup
public static Converter lookup(Class clazz)(Code)

Look up and return any registered Converter for the specified destination class; if there is no registered Converter, return null.

For more details see ConvertUtilsBean.


Parameters:
  clazz - Class for which to return a registered Converter The registered Converter or null if not found
See Also:   ConvertUtilsBean.lookup(Class)



lookup
public static Converter lookup(Class sourceType, Class targetType)(Code)
Look up and return any registered Converter for the specified source and destination class; if there is no registered Converter, return null.
Parameters:
  sourceType - Class of the value being converted
Parameters:
  targetType - Class of the value to be converted to The registered Converter or null if not found



register
public static void register(Converter converter, Class clazz)(Code)

Register a custom Converter for the specified destination Class, replacing any previously registered Converter.

For more details see ConvertUtilsBean.


Parameters:
  converter - Converter to be registered
Parameters:
  clazz - Destination class for conversions performed by thisConverter
See Also:   ConvertUtilsBean.register(ConverterClass)



setDefaultBoolean
public static void setDefaultBoolean(boolean newDefaultBoolean)(Code)
Sets the default value for Boolean conversions.
Parameters:
  newDefaultBoolean - The default Boolean value



setDefaultByte
public static void setDefaultByte(byte newDefaultByte)(Code)
Sets the default value for Byte conversions.
Parameters:
  newDefaultByte - The default Byte value



setDefaultCharacter
public static void setDefaultCharacter(char newDefaultCharacter)(Code)
Sets the default value for Character conversions.
Parameters:
  newDefaultCharacter - The default Character value



setDefaultDouble
public static void setDefaultDouble(double newDefaultDouble)(Code)
Sets the default value for Double conversions.
Parameters:
  newDefaultDouble - The default Double value



setDefaultFloat
public static void setDefaultFloat(float newDefaultFloat)(Code)
Sets the default value for Float conversions.
Parameters:
  newDefaultFloat - The default Float value



setDefaultInteger
public static void setDefaultInteger(int newDefaultInteger)(Code)
Sets the default value for Integer conversions.
Parameters:
  newDefaultInteger - The default Integer value



setDefaultLong
public static void setDefaultLong(long newDefaultLong)(Code)
Sets the default value for Long conversions.
Parameters:
  newDefaultLong - The default Long value



setDefaultShort
public static void setDefaultShort(short newDefaultShort)(Code)
Sets the default value for Short conversions.
Parameters:
  newDefaultShort - The default Short value



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.