Class CodegenBlock
java.lang.Object
com.espertech.esper.common.internal.bytecodemodel.base.CodegenBlock
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCodegenBlock
(CodegenMethod parentMethodNode) CodegenBlock
(CodegenCtor parentCtor) CodegenBlock
(CodegenStatementWBlockBase parentWBlock) -
Method Summary
Modifier and TypeMethodDescriptionapply
(Consumer<CodegenBlock> consumer) <T extends CodegenSymbolProvider>
CodegenBlockapplyTri
(TriConsumer<CodegenMethod, CodegenBlock, T> consumer, CodegenMethod methodNode, T symbols) assignArrayElement
(CodegenExpression ref, CodegenExpression index, CodegenExpression assignment) assignArrayElement
(String ref, CodegenExpression index, CodegenExpression assignment) assignArrayElement2Dim
(String ref, CodegenExpression indexOne, CodegenExpression indexTwo, CodegenExpression assignment) assignCompound
(CodegenExpression expression, String operator, CodegenExpression assignment) assignCompound
(String ref, String operator, CodegenExpression assignment) assignMember
(String ref, CodegenExpression assignment) assignRef
(CodegenExpression ref, CodegenExpression assignment) assignRef
(String ref, CodegenExpression assignment) blockEnd()
blockReturn
(CodegenExpression expression) blockThrow
(CodegenExpression expression) declareVar
(EPTypeClass clazz, String var, CodegenExpression initializer) declareVar
(String typeName, String var, CodegenExpression initializer) declareVarNewInstance
(EPTypeClass clazz, String var) declareVarNoInit
(EPTypeClass clazz, String var) declareVarNull
(EPTypeClass clazz, String var) declareVarWCast
(EPTypeClass clazz, String var, String rhsName) decrement
(CodegenExpression expression) decrementRef
(String ref) exprDotMethod
(CodegenExpression expression, String method, CodegenExpression... params) expression
(CodegenExpression expression) forEach
(EPTypeClass type, String name, CodegenExpression target) forLoop
(EPTypeClass type, String name, CodegenExpression initialization, CodegenExpression termination, CodegenExpression increment) forLoopIntSimple
(String name, CodegenExpression upperLimit) boolean
hasInstanceAccess
(Function<CodegenMethod, Boolean> permittedMethods) ifCondition
(CodegenExpression condition) ifConditionReturnConst
(CodegenExpression condition, Object constant) ifElse()
ifElseIf
(CodegenExpression condition) ifInstanceOf
(String name, EPTypeClass clazz) ifNotInstanceOf
(String name, EPTypeClass clazz) ifNull
(CodegenExpression expression) ifRefNotNull
(String ref) ifRefNotTypeReturnConst
(String ref, EPTypeClass type, Object constant) void
ifReturn
(CodegenExpression result) increment
(CodegenExpression expression) incrementRef
(String ref) boolean
isClosed()
boolean
isEmpty()
localMethod
(CodegenMethod methodNode, CodegenExpression... parameters) void
mergeClasses
(Set<Class> classes) methodReturn
(CodegenExpression expression) methodThrowUnsupported
(String text) void
render
(StringBuilder builder, Map<Class, String> imports, boolean isInnerClass, int level, CodegenIndent indent) void
returnMethodOrBlock
(CodegenExpression expression) staticMethod
(Class clazz, String method, CodegenExpression... params) staticMethod
(String className, String method, CodegenExpression... params) superCtor
(CodegenExpression... params) switchBlockExpressions
(CodegenExpression switchExpression, CodegenExpression[] expressions, boolean blocksReturnValues, boolean withDefaultUnsupported) switchBlockOfLength
(CodegenExpression switchExpression, int length, boolean blocksReturnValues) switchBlockOfLength
(CodegenExpression switchExpression, int length, boolean blocksReturnValues, int offset) switchBlockOptions
(CodegenExpression switchExpression, int[] options, boolean blocksReturnValues) synchronizedOn
(CodegenExpression expression) void
traverseExpressions
(Consumer<CodegenExpression> consumer) tryCatch()
tryEnd()
tryReturn
(CodegenExpression expression) whileLoop
(CodegenExpression expression)
-
Field Details
-
statements
-
-
Constructor Details
-
CodegenBlock
public CodegenBlock() -
CodegenBlock
-
CodegenBlock
-
CodegenBlock
-
-
Method Details
-
expression
-
decrement
-
decrementRef
-
increment
-
incrementRef
-
ifConditionReturnConst
-
ifNotInstanceOf
-
ifInstanceOf
-
ifRefNull
-
ifNull
-
ifRefNotNull
-
ifCondition
-
synchronizedOn
-
forLoopIntSimple
-
forLoop
public CodegenBlock forLoop(EPTypeClass type, String name, CodegenExpression initialization, CodegenExpression termination, CodegenExpression increment) -
forEach
-
tryCatch
-
declareVarWCast
-
declareVar
-
declareVarNewInstance
-
declareVar
-
declareVarNoInit
-
declareVarNull
-
superCtor
-
assignRef
-
assignMember
-
assignRef
-
breakLoop
-
assignArrayElement
public CodegenBlock assignArrayElement(String ref, CodegenExpression index, CodegenExpression assignment) -
assignArrayElement2Dim
public CodegenBlock assignArrayElement2Dim(String ref, CodegenExpression indexOne, CodegenExpression indexTwo, CodegenExpression assignment) -
assignArrayElement
public CodegenBlock assignArrayElement(CodegenExpression ref, CodegenExpression index, CodegenExpression assignment) -
exprDotMethod
public CodegenBlock exprDotMethod(CodegenExpression expression, String method, CodegenExpression... params) -
staticMethod
-
staticMethod
-
localMethod
-
ifRefNullReturnFalse
-
ifRefNotTypeReturnConst
-
ifRefNullReturnNull
-
ifNullReturnNull
-
blockReturn
-
blockReturnNoValue
-
tryReturn
-
tryEnd
-
blockThrow
-
blockEnd
-
methodThrowUnsupported
-
methodThrowUnsupported
-
methodReturn
-
methodEnd
-
render
public void render(StringBuilder builder, Map<Class, String> imports, boolean isInnerClass, int level, CodegenIndent indent) -
mergeClasses
-
ifElseIf
-
ifElse
-
ifReturn
-
blockContinue
-
whileLoop
-
returnMethodOrBlock
-
switchBlockOfLength
public CodegenBlock[] switchBlockOfLength(CodegenExpression switchExpression, int length, boolean blocksReturnValues, int offset) -
switchBlockOfLength
public CodegenBlock[] switchBlockOfLength(CodegenExpression switchExpression, int length, boolean blocksReturnValues) -
switchBlockOptions
public CodegenBlock[] switchBlockOptions(CodegenExpression switchExpression, int[] options, boolean blocksReturnValues) -
switchBlockExpressions
public CodegenStatementSwitch switchBlockExpressions(CodegenExpression switchExpression, CodegenExpression[] expressions, boolean blocksReturnValues, boolean withDefaultUnsupported) -
apply
-
applyTri
public <T extends CodegenSymbolProvider> CodegenBlock applyTri(TriConsumer<CodegenMethod, CodegenBlock, T> consumer, CodegenMethod methodNode, T symbols) -
assignCompound
public CodegenBlock assignCompound(CodegenExpression expression, String operator, CodegenExpression assignment) -
assignCompound
-
isClosed
public boolean isClosed() -
hasInstanceAccess
-
traverseExpressions
-
isEmpty
public boolean isEmpty() -
getStatements
-