Java Doc for ValueUtils.java in  » Library » Apache-commons-jxpath-1.2-src » org » apache » commons » jxpath » 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 » Library » Apache commons jxpath 1.2 src » org.apache.commons.jxpath.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.jxpath.util.ValueUtils

ValueUtils
public class ValueUtils (Code)
Collection and property access utilities.
author:
   Dmitri Plotnikov
version:
   $Revision: 1.19 $ $Date: 2004/04/04 22:06:36 $




Method Summary
public static  ObjectexpandCollection(Object collection, int size)
     Grows the collection if necessary to the specified size.
public static  MethodgetAccessibleMethod(Method method)
     Return an accessible method (that is, one that can be invoked via reflection) that implements the specified Method.
public static  intgetCollectionHint(Class clazz)
     Returns 1 if the type is a collection, -1 if it is definitely not and 0 if it may be a collection in some cases.
public static  DynamicPropertyHandlergetDynamicPropertyHandler(Class clazz)
     Returns a shared instance of the dynamic property handler class returned by getDynamicPropertyHandlerClass().
public static  intgetIndexedPropertyLength(Object object, IndexedPropertyDescriptor pd)
     If there is a regular non-indexed read method for this property, uses this method to obtain the collection and then returns its length. Otherwise, attempts to guess the length of the collection by calling the indexed get method repeatedly.
public static  intgetLength(Object collection)
     Returns the length of the supplied collection.
public static  ObjectgetValue(Object collection, int index)
     Returns the index'th element of the supplied collection.
public static  ObjectgetValue(Object bean, PropertyDescriptor propertyDescriptor)
     Returns the value of the bean's property represented by the supplied property descriptor.
public static  ObjectgetValue(Object bean, PropertyDescriptor propertyDescriptor, int index)
     Returns the index'th element of the bean's property represented by the supplied property descriptor.
public static  ObjectgetValue(Object object)
     If the parameter is a container, opens the container and return the contents.
public static  booleanisCollection(Object value)
    
public static  Iteratoriterate(Object collection)
     Returns an iterator for the supplied collection.
public static  Objectremove(Object collection, int index)
     Returns the index'th element from the supplied collection.
public static  voidsetValue(Object collection, int index, Object value)
     Modifies the index'th element of the supplied collection.
public static  voidsetValue(Object bean, PropertyDescriptor propertyDescriptor, Object value)
     Modifies the value of the bean's property represented by the supplied property descriptor.
public static  voidsetValue(Object bean, PropertyDescriptor propertyDescriptor, int index, Object value)
     Modifies the index'th element of the bean's property represented by the supplied property descriptor.



Method Detail
expandCollection
public static Object expandCollection(Object collection, int size)(Code)
Grows the collection if necessary to the specified size. Returns the new, expanded collection.



getAccessibleMethod
public static Method getAccessibleMethod(Method method)(Code)
Return an accessible method (that is, one that can be invoked via reflection) that implements the specified Method. If no such method can be found, return null.
Parameters:
  method - The method that we wish to call



getCollectionHint
public static int getCollectionHint(Class clazz)(Code)
Returns 1 if the type is a collection, -1 if it is definitely not and 0 if it may be a collection in some cases.



getDynamicPropertyHandler
public static DynamicPropertyHandler getDynamicPropertyHandler(Class clazz)(Code)
Returns a shared instance of the dynamic property handler class returned by getDynamicPropertyHandlerClass().



getIndexedPropertyLength
public static int getIndexedPropertyLength(Object object, IndexedPropertyDescriptor pd)(Code)
If there is a regular non-indexed read method for this property, uses this method to obtain the collection and then returns its length. Otherwise, attempts to guess the length of the collection by calling the indexed get method repeatedly. The method is supposed to throw an exception if the index is out of bounds.



getLength
public static int getLength(Object collection)(Code)
Returns the length of the supplied collection. If the supplied object is not a collection, returns 1. If collection is null, returns 0.



getValue
public static Object getValue(Object collection, int index)(Code)
Returns the index'th element of the supplied collection.



getValue
public static Object getValue(Object bean, PropertyDescriptor propertyDescriptor)(Code)
Returns the value of the bean's property represented by the supplied property descriptor.



getValue
public static Object getValue(Object bean, PropertyDescriptor propertyDescriptor, int index)(Code)
Returns the index'th element of the bean's property represented by the supplied property descriptor.



getValue
public static Object getValue(Object object)(Code)
If the parameter is a container, opens the container and return the contents. The method is recursive.



isCollection
public static boolean isCollection(Object value)(Code)
Returns true if the object is an array or a Collection



iterate
public static Iterator iterate(Object collection)(Code)
Returns an iterator for the supplied collection. If the argument is null, returns an empty iterator. If the argument is not a collection, returns an iterator that produces just that one object.



remove
public static Object remove(Object collection, int index)(Code)
Returns the index'th element from the supplied collection.



setValue
public static void setValue(Object collection, int index, Object value)(Code)
Modifies the index'th element of the supplied collection. Converts the value to the required type if necessary.



setValue
public static void setValue(Object bean, PropertyDescriptor propertyDescriptor, Object value)(Code)
Modifies the value of the bean's property represented by the supplied property descriptor.



setValue
public static void setValue(Object bean, PropertyDescriptor propertyDescriptor, int index, Object value)(Code)
Modifies the index'th element of the bean's property represented by the supplied property descriptor. Converts the value to the required type if necessary.



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.