Class StatementMaker
- java.lang.Object
-
- org.jd.core.v1.service.converter.classfiletojavasyntax.util.StatementMaker
-
public class StatementMaker extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classStatementMaker.MemberVisitorprotected static classStatementMaker.NopBitSetprotected static classStatementMaker.SwitchCaseComparator
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StatementMaker(TypeMaker typeMaker, LocalVariableMaker localVariableMaker, ClassFile classFile, ClassFileBodyDeclaration bodyDeclaration, ClassFileConstructorOrMethodDeclaration comd)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidchangeEndLoopToStartLoop(java.util.BitSet visited, BasicBlock basicBlock)protected booleancheckFieldReference(java.lang.String fieldName, Expression expression)protected intcountStartLoop(BasicBlock bb)protected voidcreateDoWhileContinue(BasicBlock last)protected ExpressioncreateObjectTypeReferenceDotClassExpression(int lineNumber, java.lang.String fieldName, MethodInvocationExpression mie)protected TypegetTernaryOperatorExpressionType(ObjectType ot1, ObjectType ot2)Statementsmake(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 Detail
-
SWITCH_CASE_COMPARATOR
protected static final StatementMaker.SwitchCaseComparator SWITCH_CASE_COMPARATOR
-
FINALLY_EXCEPTION_EXPRESSION
protected static final NullExpression FINALLY_EXCEPTION_EXPRESSION
-
MERGE_TRY_WITH_RESOURCES_STATEMENT_VISITOR
protected static final MergeTryWithResourcesStatementVisitor MERGE_TRY_WITH_RESOURCES_STATEMENT_VISITOR
-
typeMaker
protected TypeMaker typeMaker
-
typeBounds
protected java.util.Map<java.lang.String,BaseType> typeBounds
-
localVariableMaker
protected LocalVariableMaker localVariableMaker
-
byteCodeParser
protected ByteCodeParser byteCodeParser
-
majorVersion
protected int majorVersion
-
internalTypeName
protected java.lang.String internalTypeName
-
bodyDeclaration
protected ClassFileBodyDeclaration bodyDeclaration
-
stack
protected DefaultStack<Expression> stack
-
removeFinallyStatementsVisitor
protected RemoveFinallyStatementsVisitor removeFinallyStatementsVisitor
-
removeBinaryOpReturnStatementsVisitor
protected RemoveBinaryOpReturnStatementsVisitor removeBinaryOpReturnStatementsVisitor
-
updateIntegerConstantTypeVisitor
protected UpdateIntegerConstantTypeVisitor updateIntegerConstantTypeVisitor
-
searchFirstLineNumberVisitor
protected SearchFirstLineNumberVisitor searchFirstLineNumberVisitor
-
memberVisitor
protected StatementMaker.MemberVisitor memberVisitor
-
removeFinallyStatementsFlag
protected boolean removeFinallyStatementsFlag
-
mergeTryWithResourcesStatementFlag
protected boolean mergeTryWithResourcesStatementFlag
-
-
Constructor Detail
-
StatementMaker
public StatementMaker(TypeMaker typeMaker, LocalVariableMaker localVariableMaker, ClassFile classFile, ClassFileBodyDeclaration bodyDeclaration, ClassFileConstructorOrMethodDeclaration comd)
-
-
Method Detail
-
make
public Statements make(ControlFlowGraph cfg)
-
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
protected void removeExceptionReference(Statements catchStatements)
-
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
protected int countStartLoop(BasicBlock bb)
-
createDoWhileContinue
protected void createDoWhileContinue(BasicBlock last)
-
changeEndLoopToStartLoop
protected static void changeEndLoopToStartLoop(java.util.BitSet visited, BasicBlock basicBlock)
-
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
protected Type getTernaryOperatorExpressionType(ObjectType ot1, ObjectType ot2)
-
checkFieldReference
protected boolean checkFieldReference(java.lang.String fieldName, Expression expression)
-
createObjectTypeReferenceDotClassExpression
protected Expression createObjectTypeReferenceDotClassExpression(int lineNumber, java.lang.String fieldName, MethodInvocationExpression mie)
-
parseByteCode
protected void parseByteCode(BasicBlock basicBlock, Statements statements)
-
replacePreOperatorWithPostOperator
protected void replacePreOperatorWithPostOperator(Statements statements)
-
updateJumpStatements
protected void updateJumpStatements(Statements jumps)
-
-