Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.io
Class SymbolType

    java.lang.Object
      oracle.ifs.utils.io.SymbolType

    public class SymbolType

extends java.lang.Object

The SymbolType class encapsulates a type of symbol that represents a variable to be substituted for an arbitrary value. These symbols are typically found in text files used as settings (properties) or in scripts as variables. Different scripting languages and operating systems use different characters to denote symbols, and allow various characters to be used as valid symbol names. The symbol subsitution process is sometimes referred to as "instantiation". This class abstracts these differences and allows the Instantiator class to support any type of symbol. Some examples of symbols types are: DOS: %symbol_name% UNIX: $symbol_name SQL: &symbol_name Note: this object is immutable.

Modified:
  sgarg 05/09/2001 Externalized strings, lsaenz 11/02/1999 Created.

Field Summary
`static SymbolType` | `DOS` DOS-style symbol type: %symbol name -> all chars valid%
`static SymbolType` | `SQL` SQL-style symbol type: &alpha_num_symbol_name
`static SymbolType` | `UNIX` UNIX-style symbol type: $alpha_num_symbol_name

Constructor Summary
`SymbolType(java.lang.String symbolStart)` Create a new SymbolType.
`SymbolType(java.lang.String symbolStart, char[] validSymbolNameChars)` Create a new SymbolType.
`SymbolType(java.lang.String symbolStart, java.lang.String symbolEnd)` Create a new SymbolType.

Method Summary
`boolean` | `equals(java.lang.Object other)` Indicates whether some other SymbolType is "equal to" this one.
`java.lang.String` | `getSymbolEnd()` Returns the characters which denote the end of a symbol name.
`java.lang.String` | `getSymbolStart()` Returns the characters which denote the start of a symbol name.
`java.lang.String` | `getValidSymbolNameChars()` Returns the characters allowed in symbol names.
`boolean` | `isValidSymbolNameChar(char c)` Returns true if the given character is valid in a symbol name.
`java.lang.String` | `toString()` Returns a String representation of this SymbolType.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DOS

    public static final SymbolType DOS

  Description copied from class: `SymbolType`
  DOS-style symbol type: %symbol name -> all chars valid%

### UNIX

    public static final SymbolType UNIX

  Description copied from class: `SymbolType`
  UNIX-style symbol type: $alpha_num_symbol_name

### SQL

    public static final SymbolType SQL

  Description copied from class: `SymbolType`
  SQL-style symbol type: &alpha_num_symbol_name

Constructor Detail

### SymbolType

    public SymbolType(java.lang.String symbolStart)

  Create a new SymbolType. Sets the characters allowed in symbol names to {(a..z),(A..Z),(0..9),_} Sets the action to take when undefined symbols are found to SKIP. Sets the String which denotes the end of a symbol to the empty String (i.e., an invalid character denotes the end of a symbol)

  Parameters:
    `symbolStart` - the String which denotes the start of a symbol, i.e. "$" for UNIX symbols.
  Throws:
    `java.lang.IllegalArgumentException` - if null or the empty String is given as the value for `symbolStart`.

### SymbolType

    public SymbolType(java.lang.String symbolStart,
                      char[] validSymbolNameChars)

  Create a new SymbolType. Sets the action to take when undefined symbols are found to SKIP.

  Parameters:
    `symbolStart` - the String which denotes the start of a symbol, i.e. "$" for UNIX symbols.
    `validSymbolNameChars` - a character array containing every character allowed in symbol names. This array must contain at least one character.
  Throws:
    `java.lang.IllegalArgumentException` - if null or the empty String is given as the value for `symbolStart` or if null is given as the value for `validSymbolNameChars`.

### SymbolType

    public SymbolType(java.lang.String symbolStart,
                      java.lang.String symbolEnd)

  Create a new SymbolType. Sets the action to take when undefined symbols are found to SKIP. Because symbol strings surround the symbol names, all characters are allowed in these symbol names, except for the characters that denote the start and end of a symbol.

  Parameters:
    `symbolStart` - the String which denotes the start of a symbol, i.e. "%" for DOS symbols. This String must contain at least one character.
    `symbolEnd` - the String which denotes the end of a symbol, i.e. "%" for DOS symbols. This String must contain at least one character.
  Throws:
    `java.lang.IllegalArgumentException` - if null or the empty String is given as the value for `symbolStart`.

Method Detail

### getValidSymbolNameChars

    public java.lang.String getValidSymbolNameChars()

  Description copied from class: `SymbolType`
  Returns the characters allowed in symbol names.

  Returns:
    String containing the domain of valid symbol name characters.

### getSymbolStart

    public java.lang.String getSymbolStart()

  Description copied from class: `SymbolType`
  Returns the characters which denote the start of a symbol name.

  Returns:
    String containing the characters which denote the start of a symbol name.

### getSymbolEnd

    public java.lang.String getSymbolEnd()

  Description copied from class: `SymbolType`
  Returns the characters which denote the end of a symbol name.

  Returns:
    String containing the characters which denote the end of a symbol name.

### isValidSymbolNameChar

    public boolean isValidSymbolNameChar(char c)

  Description copied from class: `SymbolType`
  Returns true if the given character is valid in a symbol name.

  Parameters:
    `c` - the character whose validity to test.
  Returns:
    true if the given character is not in the symbol start string or in the symbol end string and the character is in the domain of valid characters.

### equals

    public boolean equals(java.lang.Object other)

  Description copied from class: `SymbolType`
  Indicates whether some other SymbolType is "equal to" this one.

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true if the characters which denote the start and end of symbols and the characters allowed in symbol names are equal in both SymbolType objects and if `other` is an `instanceof SymbolType`.

### toString

    public java.lang.String toString()

  Description copied from class: `SymbolType`
  Returns a String representation of this SymbolType.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a String representation of this SymbolType.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD