Package com.cloudimpl.codegen4j
Class FunctionBlock
- java.lang.Object
-
- com.cloudimpl.codegen4j.CodeBlock
-
- com.cloudimpl.codegen4j.PermissionBlock
-
- com.cloudimpl.codegen4j.FunctionBlock
-
public final class FunctionBlock extends PermissionBlock
- Author:
- nuwansa
-
-
Field Summary
Fields Modifier and Type Field Description protected StringfunctionNameprotected StringreturnType-
Fields inherited from class com.cloudimpl.codegen4j.PermissionBlock
isFinal, isStatic, level
-
Fields inherited from class com.cloudimpl.codegen4j.CodeBlock
codeBlocks
-
-
Constructor Summary
Constructors Constructor Description FunctionBlock(String functionName, ClassBlock classBlock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StatementgenerateHeader()ClassBlockgetClassBlock()FunctionBlockwithArgs(String... args)FunctionBlockwithReturnType(String returnType)-
Methods inherited from class com.cloudimpl.codegen4j.PermissionBlock
withAccess, withFinal, withStatic
-
Methods inherited from class com.cloudimpl.codegen4j.CodeBlock
addStmt, collectImports, createBlock, createElse, createElseIf, createIf, createName, createSwitch, createSynchronousBlock, disableBlockSpace, generateCode, pushBlock, stmt, var, withAnnotation, withImports, withReturnStatment
-
-
-
-
Constructor Detail
-
FunctionBlock
public FunctionBlock(String functionName, ClassBlock classBlock)
-
-
Method Detail
-
getClassBlock
public ClassBlock getClassBlock()
-
withArgs
public FunctionBlock withArgs(String... args)
-
withReturnType
public FunctionBlock withReturnType(String returnType)
-
generateHeader
protected Statement generateHeader()
- Specified by:
generateHeaderin classCodeBlock
-
-