Package org.apache.bsf.util
Class CodeBuffer
java.lang.Object
org.apache.bsf.util.CodeBuffer
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddConstructorException(String exceptionName) voidaddConstructorStatement(String statement) voidaddFieldDeclaration(String statement) voidaddImplements(String importName) voidvoidaddInitializerStatement(String statement) voidaddMethodDeclaration(String statement) voidaddServiceMethodException(String exceptionName) voidaddServiceMethodStatement(String statement) buildNewSymbol(String prefix) voidvoidmerge(CodeBuffer otherCB) voidvoidprint(PrintWriter out, boolean formatOutput) voidvoidvoidsetClassName(String className) voidsetExtends(String extendsName) voidsetFinalServiceMethodStatement(ObjInfo finalStatementInfo) voidsetPackageName(String packageName) voidsetServiceMethodName(String serviceMethodName) voidsetServiceMethodReturnType(Class serviceMethodReturnType) voidsetSymbolTable(Hashtable symbolTable) booleantoString()
-
Constructor Details
-
CodeBuffer
public CodeBuffer() -
CodeBuffer
-
-
Method Details
-
addConstructorArgument
-
addConstructorException
-
addConstructorStatement
-
addFieldDeclaration
-
addImplements
-
addImport
-
addInitializerStatement
-
addMethodDeclaration
-
addServiceMethodException
-
addServiceMethodStatement
-
buildNewSymbol
-
clearSymbolTable
public void clearSymbolTable() -
getClassName
-
getConstructorArguments
-
getConstructorBuffer
-
getConstructorExceptions
-
getExtends
-
getFieldBuffer
-
getFinalServiceMethodStatement
-
getImplements
-
getImports
-
getInitializerBuffer
-
getMethodBuffer
-
getPackageName
-
getServiceMethodBuffer
-
getServiceMethodExceptions
-
getServiceMethodName
-
getServiceMethodReturnType
-
getSymbol
-
getSymbolTable
-
merge
-
popSymbolTable
public void popSymbolTable() -
print
-
pushSymbolTable
public void pushSymbolTable() -
putSymbol
-
setClassName
-
setExtends
-
setFinalServiceMethodStatement
-
setPackageName
-
setServiceMethodName
-
setServiceMethodReturnType
-
setSymbolTable
-
symbolTableIsStacked
public boolean symbolTableIsStacked() -
toString
-