Class StatementMaker
java.lang.Object
org.jd.core.v1.service.converter.classfiletojavasyntax.util.StatementMaker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassFileBodyDeclarationprotected ByteCodeParserprotected static final NullExpressionprotected Stringprotected LocalVariableMakerprotected intprotected StatementMaker.MemberVisitorprotected static final MergeTryWithResourcesStatementVisitorprotected booleanprotected RemoveBinaryOpReturnStatementsVisitorprotected booleanprotected RemoveFinallyStatementsVisitorprotected SearchFirstLineNumberVisitorprotected DefaultStack<Expression> protected static final StatementMaker.SwitchCaseComparatorprotected TypeMakerprotected UpdateIntegerConstantTypeVisitor -
Constructor Summary
ConstructorsConstructorDescriptionStatementMaker(TypeMaker typeMaker, LocalVariableMaker localVariableMaker, ClassFile classFile, ClassFileBodyDeclaration bodyDeclaration, ClassFileConstructorOrMethodDeclaration comd) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidchangeEndLoopToStartLoop(BitSet visited, BasicBlock basicBlock) protected booleancheckFieldReference(String fieldName, Expression expression) protected intprotected voidprotected ExpressioncreateObjectTypeReferenceDotClassExpression(int lineNumber, String fieldName, MethodInvocationExpression mie) protected Typemake(ControlFlowGraph cfg) protected ExpressionmakeExpression(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected voidmakeStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) A recursive, next neighbour first, statements builder from basic blocks.protected StatementsmakeSubStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected StatementsmakeSubStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps, Statements updateStatements) protected TernaryOperatorExpressionnewTernaryOperatorExpression(int lineNumber, Expression condition, Expression expressionTrue, Expression expressionFalse) protected voidparseByteCode(BasicBlock basicBlock, Statements statements) protected voidparseIf(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected voidparseJSR(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected voidparseLoop(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected voidparseSwitch(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) protected ExpressionparseTernaryOperator(int lineNumber, Expression condition, Expression exp1, Expression exp2) protected voidparseTry(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps, boolean jsr, boolean eclipse) protected voidremoveExceptionReference(Statements catchStatements) protected voidreplacePreOperatorWithPostOperator(Statements statements) protected voidupdateJumpStatements(Statements jumps)
-
Field Details
-
SWITCH_CASE_COMPARATOR
-
FINALLY_EXCEPTION_EXPRESSION
-
MERGE_TRY_WITH_RESOURCES_STATEMENT_VISITOR
protected static final MergeTryWithResourcesStatementVisitor MERGE_TRY_WITH_RESOURCES_STATEMENT_VISITOR -
typeMaker
-
typeBounds
-
localVariableMaker
-
byteCodeParser
-
majorVersion
protected int majorVersion -
internalTypeName
-
bodyDeclaration
-
stack
-
removeFinallyStatementsVisitor
-
removeBinaryOpReturnStatementsVisitor
-
updateIntegerConstantTypeVisitor
-
searchFirstLineNumberVisitor
-
memberVisitor
-
removeFinallyStatementsFlag
protected boolean removeFinallyStatementsFlag -
mergeTryWithResourcesStatementFlag
protected boolean mergeTryWithResourcesStatementFlag
-
-
Constructor Details
-
StatementMaker
public StatementMaker(TypeMaker typeMaker, LocalVariableMaker localVariableMaker, ClassFile classFile, ClassFileBodyDeclaration bodyDeclaration, ClassFileConstructorOrMethodDeclaration comd)
-
-
Method Details
-
make
-
makeStatements
protected void makeStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) A recursive, next neighbour first, statements builder from basic blocks.- Parameters:
basicBlock- Current basic blockstatements- List to populate
-
makeSubStatements
protected Statements makeSubStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps, Statements updateStatements) -
makeSubStatements
protected Statements makeSubStatements(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
makeExpression
protected Expression makeExpression(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
parseSwitch
protected void parseSwitch(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
parseTry
protected void parseTry(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps, boolean jsr, boolean eclipse) -
removeExceptionReference
-
parseJSR
protected void parseJSR(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
parseIf
protected void parseIf(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
parseLoop
protected void parseLoop(WatchDog watchdog, BasicBlock basicBlock, Statements statements, Statements jumps) -
countStartLoop
-
createDoWhileContinue
-
changeEndLoopToStartLoop
-
parseTernaryOperator
protected Expression parseTernaryOperator(int lineNumber, Expression condition, Expression exp1, Expression exp2) -
newTernaryOperatorExpression
protected TernaryOperatorExpression newTernaryOperatorExpression(int lineNumber, Expression condition, Expression expressionTrue, Expression expressionFalse) -
getTernaryOperatorExpressionType
-
checkFieldReference
-
createObjectTypeReferenceDotClassExpression
protected Expression createObjectTypeReferenceDotClassExpression(int lineNumber, String fieldName, MethodInvocationExpression mie) -
parseByteCode
-
replacePreOperatorWithPostOperator
-
updateJumpStatements
-