Java Doc for ArgumentParser.java in  » Testing » abbot-1.0.1 » abbot » script » 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 » Testing » abbot 1.0.1 » abbot.script 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   abbot.script.ArgumentParser

ArgumentParser
public class ArgumentParser (Code)
Provide parsing of a String into an array of appropriately typed arguments. Arrays are indicated by square brackets, and arguments are separated by commas, e.g.
  • An empty String array (length zero): "[]"
  • Three arguments "one,two,three"
  • An array of length three: "[one,two,three]"
  • A single-element array of integer: "[1]"
  • A single null argument: "null"
  • An array of two strings: "[one,two]"
  • Commas must be escaped when they would otherwise be interpreted as an argument separator:
    "one,two%2ctwo,three" (2nd argument is "two,two")


Field Summary
final public static  StringDEFAULT_TOSTRING
    
final public static  StringESC_COMMA
    
final public static  StringNULL
    


Method Summary
public static  StringencodeArguments(String[] args)
    
public static  Objecteval(Resolver resolver, String arg, Class cls)
     Convert the given string into the given class, if possible, using any available parsers if conversion to basic types fails. The Resolver could be a parser, but it would need to adapt automatically to whatever is the current context.

Performs property substitution on the argument prior to evaluating it. Spaces are only trimmed from the argument if spaces have no meaning for the target class.

public static  Object[]eval(Resolver resolver, String[] args, Class[] params)
     Evaluate the given set of arguments into the given set of types.
public static  ParsergetParser(Class cls)
     Find a string parser for the given class.
public static  booleanisDefaultToString(String s)
     Returns whether the given String is the default toString() implementation for the given Object.
public static  String[]parseArgumentList(String encodedArgs)
     Convert the given encoded String into an array of Strings. Interprets strings of the format "[el1,el2,el3]" to be a single (array) argument (such commas do not need escaping).
public static  Stringreplace(String str, String s1, String s2)
     Replace all instances in the given String of s1 with s2.
public static  ParsersetParser(Class cls, Parser parser)
     Set the parser for a given class.
public static  Stringsubstitute(Resolver resolver, String arg)
     Performs property substitutions on the argument priort to evaluating it.
public static  StringtoString(Object value)
     Convert a value into a String representation.

Field Detail
DEFAULT_TOSTRING
final public static String DEFAULT_TOSTRING(Code)



ESC_COMMA
final public static String ESC_COMMA(Code)



NULL
final public static String NULL(Code)





Method Detail
encodeArguments
public static String encodeArguments(String[] args)(Code)



eval
public static Object eval(Resolver resolver, String arg, Class cls) throws IllegalArgumentException, NoSuchReferenceException, ComponentSearchException(Code)
Convert the given string into the given class, if possible, using any available parsers if conversion to basic types fails. The Resolver could be a parser, but it would need to adapt automatically to whatever is the current context.

Performs property substitution on the argument prior to evaluating it. Spaces are only trimmed from the argument if spaces have no meaning for the target class.




eval
public static Object[] eval(Resolver resolver, String[] args, Class[] params) throws IllegalArgumentException, NoSuchReferenceException, ComponentSearchException(Code)
Evaluate the given set of arguments into the given set of types.



getParser
public static Parser getParser(Class cls)(Code)
Find a string parser for the given class. Returns null if none found.



isDefaultToString
public static boolean isDefaultToString(String s)(Code)
Returns whether the given String is the default toString() implementation for the given Object.



parseArgumentList
public static String[] parseArgumentList(String encodedArgs)(Code)
Convert the given encoded String into an array of Strings. Interprets strings of the format "[el1,el2,el3]" to be a single (array) argument (such commas do not need escaping).

Explicit commas and square brackets in arguments must be escaped by preceding the character with a backslash ('\'). The strings '(null)' and 'null' are interpreted as the value null.

Explicit spaces should be protected by double quotes, e.g. " an argument bounded by spaces ".




replace
public static String replace(String str, String s1, String s2)(Code)
Replace all instances in the given String of s1 with s2.



setParser
public static Parser setParser(Class cls, Parser parser)(Code)
Set the parser for a given class. Returns the old one, if any.



substitute
public static String substitute(Resolver resolver, String arg)(Code)
Performs property substitutions on the argument priort to evaluating it. Substitutions are not recursive.



toString
public static String toString(Object value)(Code)
Convert a value into a String representation. Handles null values and arrays. Returns null if the String representation is the default class@pointer format.



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.