case METHODDEF:
methodDefs.append(def);
break;
case VARDEF:
JCVariableDecl vdef = (JCVariableDecl) def;
VarSymbol sym = vdef.sym;
checkDimension(vdef.pos(), sym.type);
if (vdef.init != null) {
if ((sym.flags() & STATIC) == 0) {
// Always initialize instance variables.
JCStatement init = make.at(vdef.pos()).
Assignment(sym, vdef.init);
initCode.append(init);
endPosTable.replaceTree(vdef, init);
initTAs.addAll(getAndRemoveNonFieldTAs(sym));
} else if (sym.getConstValue() == null) {
// Initialize class (static) variables only if
// they are not compile-time constants.
JCStatement init = make.at(vdef.pos).
Assignment(sym, vdef.init);
clinitCode.append(init);
endPosTable.replaceTree(vdef, init);
clinitTAs.addAll(getAndRemoveNonFieldTAs(sym));
} else {
checkStringConstant(vdef.init.pos(), sym.getConstValue());
}
}
break;
default:
Assert.error();