com.ph.pr.parser.vbs2java
Class VBS2JavaBase

java.lang.Object
  extended by com.ph.pr.parser.vbs2java.VBS2JavaBase

public abstract class VBS2JavaBase
extends java.lang.Object

Provides helper methods. VB Scripts should be converted to Java classes that extend this class.

TODO Most of this should probably become protected static final ...

Author:
Bob Herrmann, Greg Golberg (refactored non-PH-specific code from com.ph.pr.parser.vb2java.achapps.ACHAppBase)

Field Summary
 java.text.SimpleDateFormat dateFormat
           
protected  DIM False
           
protected  DIM Nothing
           
protected  DIM True
           
protected  DIM Values
           
 
Constructor Summary
VBS2JavaBase()
           
 
Method Summary
 DIM add(DIM a, DIM b)
           
 DIM and(DIM dim, DIM dim2)
           
 DIM append(DIM a, DIM b)
           
 boolean bool(DIM d)
           
static CONST C(DIM dim)
          Shortcut.
 DIM cdbl(DIM d)
           
static DIM CDbl(DIM dim)
           
 DIM CInt(DIM dim)
           
 DIM CLng(DIM dim)
           
 DIM CreateObject(DIM dim)
           
 DIM CStr(DIM dim)
           
 DIM D()
           
private  DIM D(java.math.BigDecimal num)
           
private  DIM D(DIM true2)
           
 DIM D(double d)
           
 DIM D(int x)
           
static DIM D(java.lang.String x)
          Shortcut.
 DIM DatePart(DIM dim, DIM date)
           
 DIM divide(DIM dim, DIM dim2)
           
 DIM eq(DIM a, DIM b)
           
 DIM Format(DIM data, DIM pattern)
           
 DIM FormatDateString(DIM InputString, DIM pattern)
           
 DIM gt(DIM x, DIM y)
           
 DIM gteq(DIM x, DIM y)
           
protected  int i(DIM ii)
           
 void InitFreeformFields()
           
 DIM INSTR(DIM list, DIM letter)
          InStr typical usage if (bool(noteq( INSTR(D("0123456789."),c),D(0)))) s2 = append( c,s2);
 DIM Int(DIM dim)
          Gets rid of any decimal places
 DIM INT(DIM dim)
           
 DIM IsEmpty(DIM x)
           
 DIM IsNull(DIM x)
          we dont actually support null, yet
 DIM IsNumeric(DIM x)
           
 DIM Left(DIM x, DIM len)
           
 DIM len(DIM inputString)
           
 DIM Len(DIM str)
           
 DIM LEN(DIM str)
           
 DIM lt(DIM x, DIM y)
           
 DIM lteq(DIM x, DIM y)
           
 DIM LTrim(DIM data)
           
 DIM Mid(DIM str, DIM start, DIM len)
           
 DIM MID(DIM str, DIM start, DIM len)
           
 DIM multiply(DIM dim, DIM dim2)
           
private  java.math.BigDecimal n(DIM a)
           
 boolean not(boolean b)
           
 DIM not(DIM d)
           
 DIM noteq(DIM a, DIM b)
           
 DIM or(DIM dim, DIM dim2)
           
 DIM Right(DIM outputString, DIM maxLength)
           
 DIM RPad(DIM s, DIM desiredLength)
           
protected  void rte(boolean b)
           
protected  java.lang.String s(DIM d)
           
 DIM String(DIM howMany, DIM padChar)
           
 DIM subtract(DIM dim, DIM dim2)
           
 DIM Trim(DIM dim)
           
 DIM TRIM(DIM dim)
           
 DIM UCase(DIM dim)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormat

public final java.text.SimpleDateFormat dateFormat

False

protected DIM False

Nothing

protected DIM Nothing

True

protected DIM True

Values

protected DIM Values
Constructor Detail

VBS2JavaBase

public VBS2JavaBase()
Method Detail

C

public static CONST C(DIM dim)
Shortcut.

See Also:
CONST.CONST(String)

CDbl

public static DIM CDbl(DIM dim)

CInt

public DIM CInt(DIM dim)

CLng

public DIM CLng(DIM dim)

CStr

public DIM CStr(DIM dim)

CreateObject

public DIM CreateObject(DIM dim)

D

public DIM D(double d)

D

public static DIM D(java.lang.String x)
Shortcut.

See Also:
DIM.DIM(String)

D

public DIM D()

D

public DIM D(int x)

DatePart

public DIM DatePart(DIM dim,
                    DIM date)

INSTR

public DIM INSTR(DIM list,
                 DIM letter)
InStr typical usage if (bool(noteq( INSTR(D("0123456789."),c),D(0)))) s2 = append( c,s2);


s

protected java.lang.String s(DIM d)

InitFreeformFields

public void InitFreeformFields()

Int

public DIM Int(DIM dim)
Gets rid of any decimal places


IsEmpty

public DIM IsEmpty(DIM x)

IsNull

public DIM IsNull(DIM x)
we dont actually support null, yet


IsNumeric

public DIM IsNumeric(DIM x)

LTrim

public DIM LTrim(DIM data)

Left

public DIM Left(DIM x,
                DIM len)

i

protected int i(DIM ii)

Len

public DIM Len(DIM str)

LEN

public DIM LEN(DIM str)

MID

public DIM MID(DIM str,
               DIM start,
               DIM len)

Mid

public DIM Mid(DIM str,
               DIM start,
               DIM len)

RPad

public DIM RPad(DIM s,
                DIM desiredLength)

Right

public DIM Right(DIM outputString,
                 DIM maxLength)
Parameters:
outputString -
maxLength -
Returns:

String

public DIM String(DIM howMany,
                  DIM padChar)

TRIM

public DIM TRIM(DIM dim)

Trim

public DIM Trim(DIM dim)

UCase

public DIM UCase(DIM dim)

add

public DIM add(DIM a,
               DIM b)

D

private DIM D(java.math.BigDecimal num)

n

private java.math.BigDecimal n(DIM a)

and

public DIM and(DIM dim,
               DIM dim2)

append

public DIM append(DIM a,
                  DIM b)

bool

public boolean bool(DIM d)

cdbl

public DIM cdbl(DIM d)

divide

public DIM divide(DIM dim,
                  DIM dim2)

INT

public DIM INT(DIM dim)

eq

public DIM eq(DIM a,
              DIM b)

D

private DIM D(DIM true2)

gt

public DIM gt(DIM x,
              DIM y)

gteq

public DIM gteq(DIM x,
                DIM y)

len

public DIM len(DIM inputString)

lt

public DIM lt(DIM x,
              DIM y)

lteq

public DIM lteq(DIM x,
                DIM y)

multiply

public DIM multiply(DIM dim,
                    DIM dim2)

not

public boolean not(boolean b)

not

public DIM not(DIM d)

noteq

public DIM noteq(DIM a,
                 DIM b)

or

public DIM or(DIM dim,
              DIM dim2)

subtract

public DIM subtract(DIM dim,
                    DIM dim2)

rte

protected void rte(boolean b)

Format

public DIM Format(DIM data,
                  DIM pattern)

FormatDateString

public DIM FormatDateString(DIM InputString,
                            DIM pattern)
See Also:
strftime, wcsftime