ConstExprent (VarType arrType) { ConstExprent defaultVal; if (arrType.getType() == CodeConstants.TYPE_OBJECT || arrType.getArrayDim() > 0) { defaultVal = new ConstExprent(VarType.VARTYPE_NULL, null, null); } else if (arrType.getType() == CodeConstants.TYPE_FLOAT) { defaultVal = new ConstExprent(VarType.VARTYPE_FLOAT, 0f, null); } else if (arrType.getType() == CodeConstants.TYPE_LONG) { defaultVal = new ConstExprent(VarType.VARTYPE_LONG, 0L, null); } else if (arrType.getType() == CodeConstants.TYPE_DOUBLE) { defaultVal = new ConstExprent(VarType.VARTYPE_DOUBLE, 0d, null); } else { // integer types defaultVal = new ConstExprent(0, true, null); } return defaultVal; }