coins.driver
クラス CheckOptions

java.lang.Object
  |
  +--coins.driver.CheckOptions

public class CheckOptions
extends java.lang.Object

Verify command line options whether they are listed in Registry or not. In case of adding new options or new option-items, record them in Registry.java, and if they take suboptions or option-items, add such statement as lIsCorrect &= checkCoinsOptions("hirOpt", Registry.HIR_OPT); or lIsCorrect &= checkOptions("target", Registry.ARCH, ',', '='); to isCoinsOptionsAreCorrect. The method checkCoinsOptions is used for options having delimiter '/' in such way as hirOpt=cf/cpf/cse and the method checkOptions is used for options that do not include delimiter '/', for example target=sparc-v8.


フィールドの概要
protected  java.util.List fAssemblerOptions
           
protected  CoinsOptions fCoinsOptions
           
protected  java.util.List fCompilerOptions
           
protected  CompileSpecification fCompileSpecification
           
protected  int fDbgLevel
           
protected  java.util.List fLinkerOptions
           
protected  java.util.List fPreprocessorOptions
           
 IoRoot ioRoot
           
 
コンストラクタの概要
CheckOptions(CompileSpecification pCompileSpecification, IoRoot pIoRoot)
           
 
メソッドの概要
protected  boolean checkCoinsOptions(java.lang.String pItemName, java.lang.String[] pValueList)
           
protected  boolean checkOptions(java.lang.String pItemName, java.lang.String[] pValueList, char pOptionDelimiter, char pValueDelimiter)
           
 boolean isCoinsOptionsAreCorrect()
          Check options specified in -coins:....
 boolean isListed(java.lang.String pItemValue, java.lang.String[] pItemValueList)
           
 boolean isOptionsAreCorrect()
          Check command line options assuming that they take one of the forms -optionName -optionName:subOption1,subOptions,...
 boolean isPrefixListed(java.lang.String pItemValue, java.lang.String[] pItemValueList)
           
 java.util.List separateByDelimiter(java.lang.String pText, java.lang.String pDelimiter)
          Get the set of substrings contained in pText where each substring is separated by the delimiting string pDelimiter.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

ioRoot

public final IoRoot ioRoot

fCompileSpecification

protected CompileSpecification fCompileSpecification

fCoinsOptions

protected CoinsOptions fCoinsOptions

fCompilerOptions

protected java.util.List fCompilerOptions

fPreprocessorOptions

protected java.util.List fPreprocessorOptions

fAssemblerOptions

protected java.util.List fAssemblerOptions

fLinkerOptions

protected java.util.List fLinkerOptions

fDbgLevel

protected int fDbgLevel
コンストラクタの詳細

CheckOptions

public CheckOptions(CompileSpecification pCompileSpecification,
                    IoRoot pIoRoot)
メソッドの詳細

isOptionsAreCorrect

public boolean isOptionsAreCorrect()
Check command line options assuming that they take one of the forms -optionName -optionName:subOption1,subOptions,... -optionName:subOption=item1/item2/...,subOption2=item3/item4.... return true if option name and corresponding item name are listed in Registry.java.

戻り値:
true if options are listed in Registry, return false if there is some option/item not listed in Registry.

isCoinsOptionsAreCorrect

public boolean isCoinsOptionsAreCorrect()
Check options specified in -coins:....

戻り値:
true if no undefined one is found.

checkCoinsOptions

protected boolean checkCoinsOptions(java.lang.String pItemName,
                                    java.lang.String[] pValueList)

checkOptions

protected boolean checkOptions(java.lang.String pItemName,
                               java.lang.String[] pValueList,
                               char pOptionDelimiter,
                               char pValueDelimiter)

isListed

public boolean isListed(java.lang.String pItemValue,
                        java.lang.String[] pItemValueList)

isPrefixListed

public boolean isPrefixListed(java.lang.String pItemValue,
                              java.lang.String[] pItemValueList)

separateByDelimiter

public java.util.List separateByDelimiter(java.lang.String pText,
                                          java.lang.String pDelimiter)
Get the set of substrings contained in pText where each substring is separated by the delimiting string pDelimiter. e.g. separateByDelimiter("coins.backend.sched.Schedule/RegPromote", "/") will return {"coins.backend.sched.Schedule", "RegPromote"} This can be made static method by erazing debug statement ioRoot.dbgControl.print( ... );

パラメータ:
pText - text to be divided into substrings.
戻り値:
the set of substrings.