Java Doc for UOption.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » tool » 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 » Internationalization Localization » icu4j » com.ibm.icu.dev.tool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.dev.tool.UOption

UOption
public class UOption (Code)
A command-line option. A UOption specifies the name of an option and whether or not it takes an argument. It is a mutable object that later contains the option argument, if any, and a boolean flag stating whether the option was seen or not. The static method parseArgs() takes an array of command-line arguments and an array of UOptions and parses the command-line arguments. This deliberately resembles the icu4c file uoption.[ch].

Inner Class :public interface Fn

Field Summary
final public static  intNO_ARG
    
final public static  intOPTIONAL_ARG
    
final public static  intREQUIRES_ARG
    
public  Objectcontext
    
public  booleandoesOccur
    
public  inthasArg
    
public  StringlongName
    
public  FnoptionFn
    
public  charshortName
    
public  Stringvalue
    


Method Summary
public static  UOptionBUNDLE_NAME()
    
public static  UOptionCOPYRIGHT()
    
public static  UOptionDEF(String aLongName, char aShortName, int hasArgument)
     Create a UOption with the given attributes.
public static  UOptionDESTDIR()
    
public static  UOptionENCODING()
    
public static  UOptionHELP_H()
    
public static  UOptionHELP_QUESTION_MARK()
    
public static  UOptionICUDATADIR()
    
public static  UOptionPACKAGE_NAME()
    
public static  UOptionQUIET()
    
public static  UOptionSOURCEDIR()
    
public static  UOptionVERBOSE()
    
public static  UOptionVERSION()
    
public static  UOptioncreate(String aLongName, char aShortName, int hasArgument)
     Create a UOption with the given attributes.
public static  intparseArgs(String argv, int start, UOption options)
     Java Command line argument parser. This function takes the argv[] command line and a description of the program's options in form of an array of UOption structures. Each UOption defines a long and a short name (a string and a character) for options like "--foo" and "-f". Each option is marked with whether it does not take an argument, requires one, or optionally takes one.
public static  intparseArgs(String argv, UOption options)
     Convenient method.
public  UOptionsetDefault(String s)
     Allows the default to be set in an option list.

Field Detail
NO_ARG
final public static int NO_ARG(Code)



OPTIONAL_ARG
final public static int OPTIONAL_ARG(Code)



REQUIRES_ARG
final public static int REQUIRES_ARG(Code)



context
public Object context(Code)



doesOccur
public boolean doesOccur(Code)



hasArg
public int hasArg(Code)



longName
public String longName(Code)



optionFn
public Fn optionFn(Code)



shortName
public char shortName(Code)



value
public String value(Code)





Method Detail
BUNDLE_NAME
public static UOption BUNDLE_NAME()(Code)



COPYRIGHT
public static UOption COPYRIGHT()(Code)



DEF
public static UOption DEF(String aLongName, char aShortName, int hasArgument)(Code)
Create a UOption with the given attributes. Synonym for create(), for C compatibility.



DESTDIR
public static UOption DESTDIR()(Code)



ENCODING
public static UOption ENCODING()(Code)



HELP_H
public static UOption HELP_H()(Code)



HELP_QUESTION_MARK
public static UOption HELP_QUESTION_MARK()(Code)



ICUDATADIR
public static UOption ICUDATADIR()(Code)



PACKAGE_NAME
public static UOption PACKAGE_NAME()(Code)



QUIET
public static UOption QUIET()(Code)



SOURCEDIR
public static UOption SOURCEDIR()(Code)



VERBOSE
public static UOption VERBOSE()(Code)



VERSION
public static UOption VERSION()(Code)



create
public static UOption create(String aLongName, char aShortName, int hasArgument)(Code)
Create a UOption with the given attributes.



parseArgs
public static int parseArgs(String argv, int start, UOption options)(Code)
Java Command line argument parser. This function takes the argv[] command line and a description of the program's options in form of an array of UOption structures. Each UOption defines a long and a short name (a string and a character) for options like "--foo" and "-f". Each option is marked with whether it does not take an argument, requires one, or optionally takes one. The argument may follow in the same argv[] entry for short options, or it may always follow in the next argv[] entry. An argument is in the next argv[] entry for both long and short name options, except it is taken from directly behind the short name in its own argv[] entry if there are characters following the option letter. An argument in its own argv[] entry must not begin with a '-' unless it is only the '-' itself. There is no restriction of the argument format if it is part of the short name options's argv[] entry. The argument is stored in the value field of the corresponding UOption entry, and the doesOccur field is set to 1 if the option is found at all. Short name options without arguments can be collapsed into a single argv[] entry. After an option letter takes an argument, following letters will be taken as its argument. If the same option is found several times, then the last argument value will be stored in the value field. For each option, a function can be called. This could be used for options that occur multiple times and all arguments are to be collected. All options are removed from the argv[] array itself. If the parser is successful, then it returns the number of remaining non-option strings. (Unlike C, the Java argv[] array does NOT contain the program name in argv[0].) An option "--" ends option processing; everything after this remains in the argv[] array. An option string "-" alone is treated as a non-option. If an option is not recognized or an argument missing, then the parser returns with the negative index of the argv[] entry where the error was detected.
Parameters:
  argv - this parameter is modified
Parameters:
  start - the first argument in argv[] to examine. Must be0..argv.length-1. Arguments from 0..start-1 are ignored.
Parameters:
  options - this parameter is modified the number of unprocessed arguments in argv[], includingarguments 0..start-1.



parseArgs
public static int parseArgs(String argv, UOption options)(Code)
Convenient method.



setDefault
public UOption setDefault(String s)(Code)
Allows the default to be set in an option list.
Parameters:
  s - this



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.