changed.put(self,Boolean.TRUE); } }
} else constants.remove(self); } else if(dims.length==2) { if((dims[0] instanceof JIntLiteral)&&(dims[1] instanceof JIntLiteral)) { Object[][] array=new Object[((JIntLiteral)dims[0]).intValue()][((JIntLiteral)dims[1]).intValue()]; constants.put(self,array); added=true; } else constants.remove(self); } else constants.remove(self);
    public Object visitVariableDefinition(JVariableDefinition self,					  int modifiers,					  CType type,					  String ident,					  JExpression expr) {	if (expr != null) {	    JExpression newExp = (JExpression)expr.accept(this);	    // if we have a constant AND it's a final variable...	    if (newExp.isConstant() /*&& CModifier.contains(modifiers,				      ACC_FINAL)*/) {		// reset the value		if(write)		    self.setExpression(newExp);		// remember the value for the duration of our visiting		constants.put(self, newExp);		added=true;		changed.put(self,Boolean.TRUE);	    } else if(newExp instanceof JNewArrayExpression) {		JExpression dim;		if(((JNewArrayExpression)expr).getDims().length==1) {		    dim=((JNewArrayExpression)expr).getDims()[0];		    if(dim instanceof JIntLiteral) {			constants.put(self,new Object[((JIntLiteral)dim).intValue()]);			added=true;			changed.put(self,Boolean.TRUE);		    }		}	    } else if(newExp instanceof JLocalVariableExpression) {		if(write)		    self.setExpression(newExp);		constants.put(self, newExp);		added=true;		changed.put(self,Boolean.TRUE);	    }	}	return self;    }