Java Doc for Config.java in  » Code-Analyzer » javapathfinder » gov » nasa » jpf » 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 » Code Analyzer » javapathfinder » gov.nasa.jpf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.Properties
   gov.nasa.jpf.Config

Config
public class Config extends Properties (Code)
class that encapsulates property-based JPF configuration. This is mainly an associative array with various typed accessors, and a structured initialization process. This implementation has the design constraint that it does not promote symbolic information to concrete types, which means that frequently accessed data should be promoted and cached in client classes. This in turn means we assume the data is not going to change at runtime. Major motivation for this mechanism is to avoid 'Option' classes that have concrete type fields, and hence are structural bottlenecks, i.e. every parameterized user extension (Heuristics, Scheduler etc.) require to update this single class. Note that Config is also not thread safe with respect to retrieving exceptions that occurrred during instantiation Another important caveat for both implementation and usage of Config is that it is supposed to be our master configuration mechanism, i.e. it is also used to configure other core services like logging. This means that Config initialization should not depend on these services. Initialization has to return at all times, recording potential problems for later handling. This is why we have to keep the Config data model and initialization fairly simple and robust.

Inner Class :public class Exception extends java.lang.Exception

Field Summary
final static  StringTARGET_ARGS_KEY
    
final static  StringTARGET_KEY
    
 StringfileName
    
 String[]freeArgs
    
 booleangotProperties
    
 Objectsource
    

Constructor Summary
public  Config(String[] args, String fileName, String alternatePath, Class codeBase)
    

Method Summary
public  StringgetArg(int i)
    
public  String[]getArgs()
    
public  booleangetBoolean(String key)
    
public  booleangetBoolean(String key, boolean def)
    
public static  ClassgetCallerClass(int up)
    
public  intgetChoiceIndexIgnoreCase(String key, String[] choices)
    
public  ClassgetClass(String key)
    
public  Class[]getClasses(String key)
    
public  StringgetDefaultsSourceName()
    
public  doublegetDouble(String key)
    
public  doublegetDouble(String key, double defValue)
    
public  double[]getDoubleArray(String key)
    
public  ClassgetEssentialClass(String key)
    
public  ObjectgetEssentialInstance(String key, Class type)
    
public  ObjectgetEssentialInstance(String key, Class type, Class[] argTypes, Object[] args)
    
public  StringgetExpandedString(String key)
     same as getString(), except of that we look for '${ }' patterns, and replace them with values if we find corresponding keys.
public  StringgetFileName()
    
public  ObjectgetInstance(String key, Class type)
    
public  ObjectgetInstance(String key, Class type, Class[] argTypes, Object[] args)
    
 ObjectgetInstance(String key, Class cls, Class type, Class[] argTypes, Object[] args)
     this is our private instantiation workhorse try to instantiate an object of class 'cls' by using the following ordered set of ctors 1.
public  Object[]getInstances(String key, Class type)
    
public  intgetInt(String key)
    
public  intgetInt(String key, int defValue)
    
public  int[]getIntArray(String key)
    
public  longgetLong(String key)
    
public  longgetLong(String key, long defValue)
    
public  long[]getLongArray(String key)
    
public  longgetMemorySize(String key, long defValue)
     return memory size in bytes, or 'defValue' if not in dictionary.
 StringgetMethodSignature(Constructor ctor)
    
public  intgetNonOptionArgIndex()
    
public  ObjectgetSource()
    
public  StringgetSourceName()
    
public  StringgetString(String key)
    
public  StringgetString(String key, String defValue)
    
public  String[]getStringArray(String key)
    
public  StringgetTargetArg()
    
public  String[]getTargetArgParameters()
    
public  booleangotDefaultProperties()
    
public  booleangotProperties()
    
public  booleanhasArg(String regex)
    
public  booleanhasValue(String key)
    
public  booleanhasValueIgnoreCase(String key, String value)
    
 booleanloadFile(String fileName, String alternatePath, Class codeBase)
    
 voidnormalizeValues()
    
public  voidprint(PrintWriter pw)
    
public  voidprintStatus(Logger log)
    
 voidprocessArgs(String[] args)
    
public  voidthrowException(String msg)
    

Field Detail
TARGET_ARGS_KEY
final static String TARGET_ARGS_KEY(Code)



TARGET_KEY
final static String TARGET_KEY(Code)



fileName
String fileName(Code)



freeArgs
String[] freeArgs(Code)
all arguments that are not = pairs



gotProperties
boolean gotProperties(Code)



source
Object source(Code)




Constructor Detail
Config
public Config(String[] args, String fileName, String alternatePath, Class codeBase)(Code)




Method Detail
getArg
public String getArg(int i)(Code)



getArgs
public String[] getArgs()(Code)



getBoolean
public boolean getBoolean(String key)(Code)



getBoolean
public boolean getBoolean(String key, boolean def)(Code)



getCallerClass
public static Class getCallerClass(int up)(Code)
find callers class
Parameters:
  up - -levels upwards from our caller (NOT counting ourselves) caller class, null if illegal 'up' value



getChoiceIndexIgnoreCase
public int getChoiceIndexIgnoreCase(String key, String[] choices)(Code)



getClass
public Class getClass(String key) throws Exception(Code)



getClasses
public Class[] getClasses(String key) throws Exception(Code)



getDefaultsSourceName
public String getDefaultsSourceName()(Code)



getDouble
public double getDouble(String key)(Code)



getDouble
public double getDouble(String key, double defValue)(Code)



getDoubleArray
public double[] getDoubleArray(String key) throws Exception(Code)



getEssentialClass
public Class getEssentialClass(String key) throws Exception(Code)



getEssentialInstance
public Object getEssentialInstance(String key, Class type) throws Exception(Code)



getEssentialInstance
public Object getEssentialInstance(String key, Class type, Class[] argTypes, Object[] args) throws Exception(Code)



getExpandedString
public String getExpandedString(String key)(Code)
same as getString(), except of that we look for '${ }' patterns, and replace them with values if we find corresponding keys. Expansion is not done recursively (but could be)



getFileName
public String getFileName()(Code)



getInstance
public Object getInstance(String key, Class type) throws Exception(Code)



getInstance
public Object getInstance(String key, Class type, Class[] argTypes, Object[] args) throws Exception(Code)



getInstance
Object getInstance(String key, Class cls, Class type, Class[] argTypes, Object[] args) throws Exception(Code)
this is our private instantiation workhorse try to instantiate an object of class 'cls' by using the following ordered set of ctors 1. ( ) 2. (Config) 3. () if all of that fails, or there was a 'type' provided the instantiated object does not comply with, return null



getInstances
public Object[] getInstances(String key, Class type) throws Exception(Code)



getInt
public int getInt(String key)(Code)



getInt
public int getInt(String key, int defValue)(Code)



getIntArray
public int[] getIntArray(String key) throws Exception(Code)



getLong
public long getLong(String key)(Code)



getLong
public long getLong(String key, long defValue)(Code)



getLongArray
public long[] getLongArray(String key) throws Exception(Code)



getMemorySize
public long getMemorySize(String key, long defValue)(Code)
return memory size in bytes, or 'defValue' if not in dictionary. Encoding can have a 'M' or 'k' postfix, values have to be positive integers (decimal notation)



getMethodSignature
String getMethodSignature(Constructor ctor)(Code)



getNonOptionArgIndex
public int getNonOptionArgIndex()(Code)
return the index of the first free argument that does not start with an hyphen



getSource
public Object getSource()(Code)



getSourceName
public String getSourceName()(Code)



getString
public String getString(String key)(Code)



getString
public String getString(String key, String defValue)(Code)



getStringArray
public String[] getStringArray(String key)(Code)



getTargetArg
public String getTargetArg()(Code)
return the first non-option freeArg, or 'null' if there is none (usually denotes the application to start)



getTargetArgParameters
public String[] getTargetArgParameters()(Code)
return all args that follow the first non-option freeArgs (usually denotes the parametsr to pass to the application to start)



gotDefaultProperties
public boolean gotDefaultProperties()(Code)



gotProperties
public boolean gotProperties()(Code)



hasArg
public boolean hasArg(String regex)(Code)
check if any of the freeArgs matches a regular expression
Parameters:
  regex - -regular expression to check for true if found, false if not found or no freeArgs



hasValue
public boolean hasValue(String key)(Code)



hasValueIgnoreCase
public boolean hasValueIgnoreCase(String key, String value)(Code)



loadFile
boolean loadFile(String fileName, String alternatePath, Class codeBase)(Code)



normalizeValues
void normalizeValues()(Code)
turn standard type values (boolean etc.) into common formats ("true"/"false" for booleans)



print
public void print(PrintWriter pw)(Code)



printStatus
public void printStatus(Logger log)(Code)



processArgs
void processArgs(String[] args)(Code)
extract all "+ = " parameters, store/overwrite them in our dictionary, collect all other parameters in a String array
Parameters:
  args - -array of String parameters to process



throwException
public void throwException(String msg) throws Exception(Code)



Fields inherited from java.util.Properties
protected Properties defaults(Code)(Java Doc)

Methods inherited from java.util.Properties
public String getProperty(String key)(Code)(Java Doc)
public String getProperty(String key, String defaultValue)(Code)(Java Doc)
public void list(PrintStream out)(Code)(Java Doc)
public void list(PrintWriter out)(Code)(Java Doc)
public synchronized void load(Reader reader) throws IOException(Code)(Java Doc)
public synchronized void load(InputStream inStream) throws IOException(Code)(Java Doc)
public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException(Code)(Java Doc)
public Enumeration propertyNames()(Code)(Java Doc)
public synchronized void save(OutputStream out, String comments)(Code)(Java Doc)
public synchronized Object setProperty(String key, String value)(Code)(Java Doc)
public void store(Writer writer, String comments) throws IOException(Code)(Java Doc)
public void store(OutputStream out, String comments) throws IOException(Code)(Java Doc)
public synchronized void storeToXML(OutputStream os, String comment) throws IOException(Code)(Java Doc)
public synchronized void storeToXML(OutputStream os, String comment, String encoding) throws IOException(Code)(Java Doc)
public Set<String> stringPropertyNames()(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.