com.ph.pr.parser.vbs2java
Class VBS2Java

java.lang.Object
  extended by com.ph.pr.parser.vbs2java.VBS2Java
All Implemented Interfaces:
ParserConstants, VB2JavaConstants

public class VBS2Java
extends java.lang.Object
implements VB2JavaConstants

Convert VBScript to Java

Author:
Greg Golberg

Field Summary
 
Fields inherited from interface com.ph.pr.parser.vbs2java.VB2JavaConstants
GRAMMAR, GRAMMAR_RESOURCE, VB2JAVA_GENERATED_PACKAGE, VB2JAVA_PACKAGE
 
Fields inherited from interface com.ph.pr.parser.ParserConstants
GENERATED_PKG_SUFFIX
 
Constructor Summary
VBS2Java()
           
 
Method Summary
private static void initialize()
          
static void main(java.lang.String[] args)
          Spits out Java code to stdout
static void translate(java.lang.String vbs)
          Translate a VBScript into a Java class by performing the following steps: Pre-process the original VBScript Convert VBScript to Java by calling ASTBuilder.parse(ClassLoader, String, String)and VBSVisitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VBS2Java

public VBS2Java()
Method Detail

initialize

private static void initialize()


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Spits out Java code to stdout

Parameters:
args - takes a single argument - a VBS file to translate
Throws:
java.lang.Exception

translate

public static void translate(java.lang.String vbs)
                      throws goldengine.java.ParserException,
                             java.io.IOException
Translate a VBScript into a Java class by performing the following steps:
  1. Pre-process the original VBScript
  2. Convert VBScript to Java by calling ASTBuilder.parse(ClassLoader, String, String)and VBSVisitor. If the script is named ending with -EDIT, the resulting class will implement InterFieldEditProcessor, otherwise, it will implement AddendaBuilder. In both cases, the result will be a subclass of ACHAppBase. The resulting Java file will be placed into #ACHAPPS_GENERATED_PACKAGE.version package (where version is
    vmajor_minor[_custom]
    , e.g., v5_16, or v5_18_wells). This package will be relative to com.ph.pr.parser.vbs2java.VB2JavaConstants#VB2JAVA_ROOT.
  3. Compile and move the class file (without package structure) into Pipeline#INTERMEDIATE_DIR

Parameters:
vbs - VBS to translate (assumed to be in App2HtmlConstants#APP2HTML_OUTPUTdirectory).
version - Version of the application (see XXX versioning)
Throws:
goldengine.java.ParserException - whenever the vbs
java.io.IOException - obviously