if (newArrayExprs.getNewArr(self) != null) expr = newArrayExprs.getNewArr(self); else { Object current = self; while (expr == null) { if (newArrayExprs.getNewArr(newArrayExprs.getArrAss(current)) != null) expr = newArrayExprs.getNewArr(newArrayExprs.getArrAss(current)); else current = newArrayExprs.getArrAss(current); } }
expr = getNewArrayExpr(self);
    public void visitVariableDefinition(JVariableDefinition self,                                        int modifiers,                                        CType type,                                        String ident,                                        JExpression expr) {		/*if (expr instanceof JArrayInitializer) {		declareInitializedArray(type, ident, expr);		return;		}*/		//we have an array declaration	if (type.isArrayType()) {	    //print the declaration and get the number of dimensions	    int dim = handleArrayDecl(ident, type);	    //now, get the new array expression	    if (expr == null) {//if their isn't a new array expression in the declaration		//maybe it was assigned on later, so look for it in newArrayExprs		if (newArrayExprs.getNewArr(self) != null) 		    expr = newArrayExprs.getNewArr(self);		else { //otherwise, this array was assinged another array,		    Object current = self;//so look for that array's new array expression		    while (expr == null) { //keep going until we find the new array expression			if (newArrayExprs.getNewArr(newArrayExprs.getArrAss(current)) != null)			    expr = newArrayExprs.getNewArr(newArrayExprs.getArrAss(current));			else 			    current = newArrayExprs.getArrAss(current);		    }		}	    }	    //make sure we found a new array expression	    if (expr instanceof JNewArrayExpression) {		//make sure the new array expression has the correct number of dims		assert dim == ((JNewArrayExpression)expr).getDims().length :		    "Array " + ident + " has underspecified NewArrayExpression";	    }	    else {		assert false : 		    "Trying to initialize array with something other than a new array expression";	    }	    	    	    if (expr != null) {		print(" = ");		expr.accept(this);	    }	}	else {	    print(type);	    	    print(" ");	    print(ident);	    if (expr != null) {		print(" = ");		expr.accept(this);	    } else {		if (type.isOrdinal())		    print (" = 0");		else if (type.isFloatingPoint())		    print(" = 0.0f");	    }	    	}	print(";");    }