}
}
private <T> ObjectCodec<T> createCodec(Class<T> type,
ResolverContext context) {
ObjectResolverContext passThroughContext = new BindingsContext(type,
context);
passThroughContext = ImportSupportingObjectResolverContext.decorate(
passThroughContext, type);
CodecReference reference = new CodecReference();
harvestBindings(type, passThroughContext, reference);
if (passThroughContext.getBindings().size() == 0) {
throw new CodecConstructionException("Failed to find a single bound field on " + type.getName());
}
ObjectCodec<T> result = new ObjectCodec<T>(type, rewriter,
passThroughContext);
reference.setCodec(result);