import eclipse 3.1 M4 compiler
[org.ibex.tool.git] / src / org / eclipse / jdt / internal / compiler / ast / Reference.java
index 41d498b..5a62bb6 100644 (file)
@@ -67,4 +67,19 @@ public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStr
 
 public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
 
+public int nullStatus(FlowInfo flowInfo) {
+
+       if (this.constant != null && this.constant != NotAConstant)
+               return FlowInfo.NON_NULL; // constant expression cannot be null
+       
+       LocalVariableBinding local = localVariableBinding();
+       if (local != null) {
+               if (flowInfo.isDefinitelyNull(local))
+                       return FlowInfo.NULL;
+               if (flowInfo.isDefinitelyNonNull(local))
+                       return FlowInfo.NON_NULL;
+       }       
+       return FlowInfo.UNKNOWN;
+}
+
 }