Java Doc for InternalUtils.java in  » Web-Framework » Tapestry » org » apache » tapestry » ioc » internal » 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 Framework » Tapestry » org.apache.tapestry.ioc.internal.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tapestry.ioc.internal.util.InternalUtils

InternalUtils
public class InternalUtils (Code)
Utilities used within various internal implemenations of Tapestry IOC and the rest of the tapestry-core framework.


Field Summary
final public static  StringNAME_PREFIX
     Leading punctiation on member names that is stripped off to form a property name or new member name.


Method Summary
public static  StringasString(Method method, ClassFactory classFactory)
     Converts a method to a user presentable string using a ClassFactory to obtain a MethodLocation (where possible).
public static  StringasString(Method method)
     Converts a method to a user presentable string consisting of the containing class name, the method name, and the short form of the parameter list (the class name of each parameter type, shorn of the package name portion).
public static  Object[]calculateParameters(ObjectLocator locator, Map<Class, Object> parameterDefaults, Class[] parameterTypes, Annotation[][] parameterAnnotations)
    
public static  Object[]calculateParametersForConstructor(Constructor constructor, ObjectLocator locator, Map<Class, Object> parameterDefaults)
    
public static  Object[]calculateParametersForMethod(Method method, ObjectLocator locator, Map<Class, Object> parameterDefaults)
    
public static  Stringcapitalize(String input)
     Capitalizes a string, converting the first character to uppercase.
public static  booleancontainsSymbols(String input)
     Return true if the input string contains the marker for symbols that must be expanded.
public static  StringcreateMemberName(String memberName)
     Strips leading characters defined by InternalUtils.NAME_PREFIX , then adds the prefix back in.
public static  TfindAnnotation(Annotation[] annotations, Class<T> annotationClass)
     Finds a specific annotation type within an array of annotations.
public static  ConstructorfindAutobuildConstructor(Class clazz)
     Searches a class for the "best" constructor, the public constructor with the most parameters. Returns null if there are no public constructors.
public static  Vget(Map<K, V> map, K key)
     Gets a value from a map (which may be null).
public static  booleanisBlank(String input)
     Returns true if the input is null, or is a zero length string (excluding leading/trailing whitespace).
public static  booleanisNonBlank(String input)
    
final public static  booleanisStatic(Method method)
     Returns true if the method provided is a static method.
public static  Stringjoin(List elements)
     Joins together some number of elements to form a comma separated list.
public static  StringjoinSorted(Collection elements)
     Creates a sorted copy of the provided elements, then turns that into a comma separated list.
public static  StringlastTerm(String input)
     Searches the string for the final period ('.') character and returns everything after that. The input string is generally a fully qualified class name, though tapestry-core also uses this method for the occasional property expression (which is also dot separated).
public static  LocationlocationOf(Object location)
     Sniffs the object to see if it is a Location or Locatable .
final public static  Iterator<T>reverseIterator(List<T> list)
    
public static  intsize(Object[] array)
     Returns the size of an object array, or null if the array is empty.
public static  List<String>sortedKeys(Map map)
     Extracts the string keys from a map and returns them in sorted order.
public static  StringstripMemberPrefix(String memberName)
     Strips leading punctuation ("_" and "$") from the provided name.
public static  List<String>toList(Enumeration e)
     Converts an enumeration (of Strings) into a sorted list of Strings.

Field Detail
NAME_PREFIX
final public static String NAME_PREFIX(Code)
Leading punctiation on member names that is stripped off to form a property name or new member name.





Method Detail
asString
public static String asString(Method method, ClassFactory classFactory)(Code)
Converts a method to a user presentable string using a ClassFactory to obtain a MethodLocation (where possible). InternalUtils.asString(Method) is used under the covers, to present a detailed, but not excessive, description of the class, method and parameters.
Parameters:
  method - method to convert to a string
Parameters:
  classFactory - used to obtain the MethodLocation the method formatted for presentation to the user



asString
public static String asString(Method method)(Code)
Converts a method to a user presentable string consisting of the containing class name, the method name, and the short form of the parameter list (the class name of each parameter type, shorn of the package name portion).
Parameters:
  method - short string representation



calculateParameters
public static Object[] calculateParameters(ObjectLocator locator, Map<Class, Object> parameterDefaults, Class[] parameterTypes, Annotation[][] parameterAnnotations)(Code)



calculateParametersForConstructor
public static Object[] calculateParametersForConstructor(Constructor constructor, ObjectLocator locator, Map<Class, Object> parameterDefaults)(Code)



calculateParametersForMethod
public static Object[] calculateParametersForMethod(Method method, ObjectLocator locator, Map<Class, Object> parameterDefaults)(Code)



capitalize
public static String capitalize(String input)(Code)
Capitalizes a string, converting the first character to uppercase.



containsSymbols
public static boolean containsSymbols(String input)(Code)
Return true if the input string contains the marker for symbols that must be expanded.



createMemberName
public static String createMemberName(String memberName)(Code)
Strips leading characters defined by InternalUtils.NAME_PREFIX , then adds the prefix back in.



findAnnotation
public static T findAnnotation(Annotation[] annotations, Class<T> annotationClass)(Code)
Finds a specific annotation type within an array of annotations. <
Parameters:
  T - >
Parameters:
  annotations - to search
Parameters:
  annotationClass - to match the annotation instance, if found, or null otherwise



findAutobuildConstructor
public static Constructor findAutobuildConstructor(Class clazz)(Code)
Searches a class for the "best" constructor, the public constructor with the most parameters. Returns null if there are no public constructors. If there is more than one constructor with the maximum number of parameters, it is not determined which will be returned (don't build a class like that!).
Parameters:
  clazz - to search for a constructor for the constructor to be used to instantiate the class, or null if no appropriateconstructor was found



get
public static V get(Map<K, V> map, K key)(Code)
Gets a value from a map (which may be null). <
Parameters:
  K - ><
Parameters:
  V - >
Parameters:
  map - the map to extract from (may be null)
Parameters:
  key - the value from the map, or null if the map is null



isBlank
public static boolean isBlank(String input)(Code)
Returns true if the input is null, or is a zero length string (excluding leading/trailing whitespace).



isNonBlank
public static boolean isNonBlank(String input)(Code)



isStatic
final public static boolean isStatic(Method method)(Code)
Returns true if the method provided is a static method.



join
public static String join(List elements)(Code)
Joins together some number of elements to form a comma separated list.



joinSorted
public static String joinSorted(Collection elements)(Code)
Creates a sorted copy of the provided elements, then turns that into a comma separated list.



lastTerm
public static String lastTerm(String input)(Code)
Searches the string for the final period ('.') character and returns everything after that. The input string is generally a fully qualified class name, though tapestry-core also uses this method for the occasional property expression (which is also dot separated). Returns the input string unchanged if it does not contain a period character.



locationOf
public static Location locationOf(Object location)(Code)
Sniffs the object to see if it is a Location or Locatable . Returns null if null or not convertable to a location.



reverseIterator
final public static Iterator<T> reverseIterator(List<T> list)(Code)



size
public static int size(Object[] array)(Code)
Returns the size of an object array, or null if the array is empty.



sortedKeys
public static List<String> sortedKeys(Map map)(Code)
Extracts the string keys from a map and returns them in sorted order. The keys are converted to strings.
Parameters:
  map - the map to extract keys from (may be null) the sorted keys, or the empty set if map is null



stripMemberPrefix
public static String stripMemberPrefix(String memberName)(Code)
Strips leading punctuation ("_" and "$") from the provided name.



toList
public static List<String> toList(Enumeration e)(Code)
Converts an enumeration (of Strings) into a sorted list of Strings.



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.