train_addInjectedField(ct, Resource.class, "baseResource", r, "res");
train_getResourcesFieldName(ct, "resources");
ct.makeReadOnly("_fred");
ct.claimField("_fred", annotation);
train_extendConstructor(
ct,
"{",
"_fred = as.findAsset(res, \"foo.gif\", resources.getLocale());",