// Also replace the declaration statement so that the enum instances are not constructed;
// eventually the field will be pruned but the declaration statement will only completely
// disappear if there are no side effects (constructing a new instance counts as side
// effects).
ctx.replaceMe(new JDeclarationStatement(x.getSourceInfo(), x.getVariableRef(),
program.getLiteralInt(enumField.ordinal())));
}
/**
* Remap enum types with JPrimitiveType.INT. Also handle case for arrays,
* replace enum leaftype with JPrimitive.INT. This is an override