xbn.config
Class CRCDelimiters

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.config.CRCDelimiters
Direct Known Subclasses:
CRCDFileActual

public class CRCDelimiters
extends XBNObject

Configuration related to variables in a ConfigReader, provided via CRConfig. Provided to ConfigReader via CRConfig.

Source code:  CRCDelimiters.java

Specifically, this class defines two things: The delimiters found between variable names and values (for example: '=') and the special string value to be considered as "null".


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
CRCDelimiters(char[] ac_varDelims)
          Create a CRCDelimiters.
CRCDelimiters(char[] ac_varDelims, char c_singleLineCmt)
          Create a CRCDelimiters.
CRCDelimiters(char[] ac_varDelims, char c_mlcStart, char c_mlcEnd)
          Create a CRCDelimiters.
CRCDelimiters(char[] ac_varDelims, char c_mlcStart, char c_mlcEnd, char c_singleLineCmt)
          Create a CRCDelimiters.
 
Method Summary
 char getMLCEnd()
          What character is used to delimit the end of a multi-line comment?
 char getMLCStart()
          What character is used to delimit the start of a multi-line comment?
 char getSingleLineCmt()
          What character is used to delimit the start of a single-line comment?
 APChar getVarDelimsAPC()
          Get an APChar containing the variable delimiters.
 String toString()
          Get some information about this CRCDelimiters.
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CRCDelimiters

public CRCDelimiters(char[] ac_varDelims)

Create a CRCDelimiters.

Equal to CRCDelimiters(ac_varDelims, '#')


CRCDelimiters

public CRCDelimiters(char[] ac_varDelims,
                     char c_singleLineCmt)

Create a CRCDelimiters.

Equal to CRCDelimiters(ac_varDelims, '{', '}', c_singleLineCmt)


CRCDelimiters

public CRCDelimiters(char[] ac_varDelims,
                     char c_mlcStart,
                     char c_mlcEnd)

Create a CRCDelimiters.

Equal to CRCDelimiters(ac_varDelims, c_mlcStart, c_mlcEnd, '#')


CRCDelimiters

public CRCDelimiters(char[] ac_varDelims,
                     char c_mlcStart,
                     char c_mlcEnd,
                     char c_singleLineCmt)

Create a CRCDelimiters.

This object is provided directly to the CRConfig constructor. Some extra parameter restrictions are enforced there.

No character (either equalling or existing in any of these parameters) may equal another, nor may they be invisible.

Parameters:
ac_varDelims - The delimiters to separate the names and values of ConfigReader variables. Must be non null and at least one element in length. All values must be unique, and ordered ascending. See getVarDelimsAPC.
c_mlcStart - The character used to delimit the start of a multi-line comment. May not equal c_mlcEnd or c_singleLineCmt. See getMLCStart.
c_mlcEnd - The character used to delimit the end of a multi-line comment. May not equal c_mlcStart or c_singleLineCmt. See getMLCEnd.
c_singleLineCmt - The character used to delimit the start of a single-line comment. May not equal c_mlcStart or c_mlcEnd. See getDelimSL.
Method Detail

getVarDelimsAPC

public final APChar getVarDelimsAPC()

Get an APChar containing the variable delimiters.

A variable delimiter is what is found between the name and value of a variable.

Returns:
(new APChar(ac_varDelims, true)) Where ac_varDelims is exactly as provided to the constructor. The APChar is created only once.

getMLCStart

public final char getMLCStart()

What character is used to delimit the start of a multi-line comment?

Returns:
c_mlcStart Exactly as provided to the constructor.

getMLCEnd

public final char getMLCEnd()

What character is used to delimit the end of a multi-line comment?

Returns:
c_mlcEnd Exactly as provided to the constructor.

getSingleLineCmt

public final char getSingleLineCmt()

What character is used to delimit the start of a single-line comment?

Returns:
c_singleLineCmt Exactly as provided to the constructor.

toString

public String toString()

Get some information about this CRCDelimiters.

Overrides:
toString in class Object



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo