From 20790801ad58c4100fc771f0c3b27c1116c6d815 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 17 Jun 1999 11:02:24 +0000 Subject: [PATCH] fillDeclarables added (also adds method scope classes git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@847 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/CheckNullOperator.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/jode/jode/expr/CheckNullOperator.java b/jode/jode/expr/CheckNullOperator.java index 3024579..74247b4 100644 --- a/jode/jode/expr/CheckNullOperator.java +++ b/jode/jode/expr/CheckNullOperator.java @@ -23,6 +23,12 @@ import jode.decompiler.LocalInfo; import jode.decompiler.TabbedPrintWriter; import jode.flow.VariableSet; +///#ifdef JDK12 +///import java.util.Set; +///#else +import jode.util.SimpleSet; +///#endif + /** * This is a pseudo operator, which represents the check against null * that jikes and javac generates for inner classes: @@ -75,10 +81,23 @@ public class CheckNullOperator extends Operator { super.fillInGenSet(in, gen); } +///#ifdef JDK12 +/// public void fillDeclarables(Set used) { +///#else + public void fillDeclarables(SimpleSet used) { +///#endif + used.add(local); + super.fillDeclarables(used); + } + public void dumpExpression(TabbedPrintWriter writer) throws java.io.IOException { writer.print("("+local.getName()+" = "); subExpressions[0].dumpExpression(writer, 0); writer.print(").getClass() != null ? "+local.getName()+" : null"); } + + public boolean opEquals(Operator o) { + return o instanceof CheckNullOperator; + } }