Search in sources :

Example 1 with InstanceOf

use of org.candle.decompiler.intermediate.expression.InstanceOf in project candle-decompiler by bradsdavis.

the class MethodIntermediateVisitor method visitINSTANCEOF.

public void visitINSTANCEOF(INSTANCEOF instruction) {
    ConstantPoolGen cpg = context.getMethodGen().getConstantPool();
    String type = instruction.getLoadClassType(cpg).getClassName();
    // get the left, create the right
    Expression left = context.getExpressions().pop();
    Expression right = new Resolved(context.getCurrentInstruction(), Type.BOOLEAN, type);
    InstanceOf instanceOf = new InstanceOf(context.getCurrentInstruction(), left, right);
    context.getExpressions().push(instanceOf);
}
Also used : TypedExpression(org.candle.decompiler.intermediate.expression.TypedExpression) Expression(org.candle.decompiler.intermediate.expression.Expression) InstanceOf(org.candle.decompiler.intermediate.expression.InstanceOf) Resolved(org.candle.decompiler.intermediate.expression.Resolved)

Aggregations

Expression (org.candle.decompiler.intermediate.expression.Expression)1 InstanceOf (org.candle.decompiler.intermediate.expression.InstanceOf)1 Resolved (org.candle.decompiler.intermediate.expression.Resolved)1 TypedExpression (org.candle.decompiler.intermediate.expression.TypedExpression)1