Package org.apache.bsf.util

# Class CodeBuffer

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

public class CodeBuffer extends 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
  Description
  `CodeBuffer()`
  `CodeBuffer(CodeBuffer parent)`

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### CodeBuffer

    public CodeBuffer()

  - ### CodeBuffer

    public CodeBuffer(CodeBuffer parent)

- ## Method Details

  - ### addConstructorArgument

    public void addConstructorArgument(ObjInfo arg)

  - ### addConstructorException

    public void addConstructorException(String exceptionName)

  - ### addConstructorStatement

    public void addConstructorStatement(String statement)

  - ### addFieldDeclaration

    public void addFieldDeclaration(String statement)

  - ### addImplements

    public void addImplements(String importName)

  - ### addImport

    public void addImport(String importName)

  - ### addInitializerStatement

    public void addInitializerStatement(String statement)

  - ### addMethodDeclaration

    public void addMethodDeclaration(String statement)

  - ### addServiceMethodException

    public void addServiceMethodException(String exceptionName)

  - ### addServiceMethodStatement

    public void addServiceMethodStatement(String statement)

  - ### buildNewSymbol

    public String buildNewSymbol(String prefix)

  - ### clearSymbolTable

    public void clearSymbolTable()

  - ### getClassName

    public String getClassName()

  - ### getConstructorArguments

    public Vector getConstructorArguments()

  - ### getConstructorBuffer

    public StringBuffer getConstructorBuffer()

  - ### getConstructorExceptions

    public Vector getConstructorExceptions()

  - ### getExtends

    public String getExtends()

  - ### getFieldBuffer

    public StringBuffer getFieldBuffer()

  - ### getFinalServiceMethodStatement

    public ObjInfo getFinalServiceMethodStatement()

  - ### getImplements

    public Vector getImplements()

  - ### getImports

    public Vector getImports()

  - ### getInitializerBuffer

    public StringBuffer getInitializerBuffer()

  - ### getMethodBuffer

    public StringBuffer getMethodBuffer()

  - ### getPackageName

    public String getPackageName()

  - ### getServiceMethodBuffer

    public StringBuffer getServiceMethodBuffer()

  - ### getServiceMethodExceptions

    public Vector getServiceMethodExceptions()

  - ### getServiceMethodName

    public String getServiceMethodName()

  - ### getServiceMethodReturnType

    public Class getServiceMethodReturnType()

  - ### getSymbol

    public ObjInfo getSymbol(String symbol)

  - ### getSymbolTable

    public Hashtable getSymbolTable()

  - ### merge

    public void merge(CodeBuffer otherCB)

  - ### popSymbolTable

    public void popSymbolTable()

  - ### print

    public void print(PrintWriter out, boolean formatOutput)

  - ### pushSymbolTable

    public void pushSymbolTable()

  - ### putSymbol

    public void putSymbol(String symbol, ObjInfo obj)

  - ### setClassName

    public void setClassName(String className)

  - ### setExtends

    public void setExtends(String extendsName)

  - ### setFinalServiceMethodStatement

    public void setFinalServiceMethodStatement(ObjInfo finalStatementInfo)

  - ### setPackageName

    public void setPackageName(String packageName)

  - ### setServiceMethodName

    public void setServiceMethodName(String serviceMethodName)

  - ### setServiceMethodReturnType

    public void setServiceMethodReturnType(Class serviceMethodReturnType)

  - ### setSymbolTable

    public void setSymbolTable(Hashtable symbolTable)

  - ### symbolTableIsStacked

    public boolean symbolTableIsStacked()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`