* @param context the transformation context
* @param cg the class gen
* @param initialCg the initial class gen
*/
private void addSerialVersionUidField(final Context context, ClassGen cg, final ClassGen initialCg) {
FieldGen field = new FieldGen(
Constants.ACC_FINAL | Constants.ACC_STATIC,
Type.LONG,
TransformationUtil.SERIAL_VERSION_UID_FIELD,
cg.getConstantPool());
final long uid = TransformationUtil.calculateSerialVersionUid(context, initialCg);
field.setInitValue(uid);
TransformationUtil.addField(cg, field.getField());
}