org.apache.bsf.util

## Class CodeBuffer

- java.lang.Object
- - org.apache.bsf.util.CodeBuffer

-     public class CodeBuffer
      extends java.lang.Object

  A `CodeBuffer` object is used as a code repository for generated Java code. It provides buffers which correspond to the various sections of a Java class.
  Author:
    Matthew J. Duftler

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CodeBuffer()`
    `CodeBuffer(CodeBuffer parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConstructorArgument(ObjInfo arg)`
    `void` | `addConstructorException(java.lang.String exceptionName)`
    `void` | `addConstructorStatement(java.lang.String statement)`
    `void` | `addFieldDeclaration(java.lang.String statement)`
    `void` | `addImplements(java.lang.String importName)`
    `void` | `addImport(java.lang.String importName)`
    `void` | `addInitializerStatement(java.lang.String statement)`
    `void` | `addMethodDeclaration(java.lang.String statement)`
    `void` | `addServiceMethodException(java.lang.String exceptionName)`
    `void` | `addServiceMethodStatement(java.lang.String statement)`
    `java.lang.String` | `buildNewSymbol(java.lang.String prefix)`
    `void` | `clearSymbolTable()`
    `java.lang.String` | `getClassName()`
    `java.util.Vector` | `getConstructorArguments()`
    `java.lang.StringBuffer` | `getConstructorBuffer()`
    `java.util.Vector` | `getConstructorExceptions()`
    `java.lang.String` | `getExtends()`
    `java.lang.StringBuffer` | `getFieldBuffer()`
    `ObjInfo` | `getFinalServiceMethodStatement()`
    `java.util.Vector` | `getImplements()`
    `java.util.Vector` | `getImports()`
    `java.lang.StringBuffer` | `getInitializerBuffer()`
    `java.lang.StringBuffer` | `getMethodBuffer()`
    `java.lang.String` | `getPackageName()`
    `java.lang.StringBuffer` | `getServiceMethodBuffer()`
    `java.util.Vector` | `getServiceMethodExceptions()`
    `java.lang.String` | `getServiceMethodName()`
    `java.lang.Class` | `getServiceMethodReturnType()`
    `ObjInfo` | `getSymbol(java.lang.String symbol)`
    `java.util.Hashtable` | `getSymbolTable()`
    `void` | `merge(CodeBuffer otherCB)`
    `void` | `popSymbolTable()`
    `void` | `print(java.io.PrintWriter out, boolean formatOutput)`
    `void` | `pushSymbolTable()`
    `void` | `putSymbol(java.lang.String symbol, ObjInfo obj)`
    `void` | `setClassName(java.lang.String className)`
    `void` | `setExtends(java.lang.String extendsName)`
    `void` | `setFinalServiceMethodStatement(ObjInfo finalStatementInfo)`
    `void` | `setPackageName(java.lang.String packageName)`
    `void` | `setServiceMethodName(java.lang.String serviceMethodName)`
    `void` | `setServiceMethodReturnType(java.lang.Class serviceMethodReturnType)`
    `void` | `setSymbolTable(java.util.Hashtable symbolTable)`
    `boolean` | `symbolTableIsStacked()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CodeBuffer

          public CodeBuffer()

    - #### CodeBuffer

          public CodeBuffer(CodeBuffer parent)

  - ### Method Detail

    - #### addConstructorArgument

          public void addConstructorArgument(ObjInfo arg)

    - #### addConstructorException

          public void addConstructorException(java.lang.String exceptionName)

    - #### addConstructorStatement

          public void addConstructorStatement(java.lang.String statement)

    - #### addFieldDeclaration

          public void addFieldDeclaration(java.lang.String statement)

    - #### addImplements

          public void addImplements(java.lang.String importName)

    - #### addImport

          public void addImport(java.lang.String importName)

    - #### addInitializerStatement

          public void addInitializerStatement(java.lang.String statement)

    - #### addMethodDeclaration

          public void addMethodDeclaration(java.lang.String statement)

    - #### addServiceMethodException

          public void addServiceMethodException(java.lang.String exceptionName)

    - #### addServiceMethodStatement

          public void addServiceMethodStatement(java.lang.String statement)

    - #### buildNewSymbol

          public java.lang.String buildNewSymbol(java.lang.String prefix)

    - #### clearSymbolTable

          public void clearSymbolTable()

    - #### getClassName

          public java.lang.String getClassName()

    - #### getConstructorArguments

          public java.util.Vector getConstructorArguments()

    - #### getConstructorBuffer

          public java.lang.StringBuffer getConstructorBuffer()

    - #### getConstructorExceptions

          public java.util.Vector getConstructorExceptions()

    - #### getExtends

          public java.lang.String getExtends()

    - #### getFieldBuffer

          public java.lang.StringBuffer getFieldBuffer()

    - #### getFinalServiceMethodStatement

          public ObjInfo getFinalServiceMethodStatement()

    - #### getImplements

          public java.util.Vector getImplements()

    - #### getImports

          public java.util.Vector getImports()

    - #### getInitializerBuffer

          public java.lang.StringBuffer getInitializerBuffer()

    - #### getMethodBuffer

          public java.lang.StringBuffer getMethodBuffer()

    - #### getPackageName

          public java.lang.String getPackageName()

    - #### getServiceMethodBuffer

          public java.lang.StringBuffer getServiceMethodBuffer()

    - #### getServiceMethodExceptions

          public java.util.Vector getServiceMethodExceptions()

    - #### getServiceMethodName

          public java.lang.String getServiceMethodName()

    - #### getServiceMethodReturnType

          public java.lang.Class getServiceMethodReturnType()

    - #### getSymbol

          public ObjInfo getSymbol(java.lang.String symbol)

    - #### getSymbolTable

          public java.util.Hashtable getSymbolTable()

    - #### merge

          public void merge(CodeBuffer otherCB)

    - #### popSymbolTable

          public void popSymbolTable()

    - #### print

          public void print(java.io.PrintWriter out,
                            boolean formatOutput)

    - #### pushSymbolTable

          public void pushSymbolTable()

    - #### putSymbol

          public void putSymbol(java.lang.String symbol,
                                ObjInfo obj)

    - #### setClassName

          public void setClassName(java.lang.String className)

    - #### setExtends

          public void setExtends(java.lang.String extendsName)

    - #### setFinalServiceMethodStatement

          public void setFinalServiceMethodStatement(ObjInfo finalStatementInfo)

    - #### setPackageName

          public void setPackageName(java.lang.String packageName)

    - #### setServiceMethodName

          public void setServiceMethodName(java.lang.String serviceMethodName)

    - #### setServiceMethodReturnType

          public void setServiceMethodReturnType(java.lang.Class serviceMethodReturnType)

    - #### setSymbolTable

          public void setSymbolTable(java.util.Hashtable symbolTable)

    - #### symbolTableIsStacked

          public boolean symbolTableIsStacked()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`