@SuppressWarnings("unchecked")
private <T> Codec<T> createCodec(Class<T> type, ResolverContext context,
AnnotatedElement metadata) {
BoundObject settings = metadata.getAnnotation(BoundObject.class);
// TODO: Handle type incompatibility
if (Void.class.equals(settings.type())) {
if (settings.selectFrom().alternatives().length > 0
|| settings.selectFrom().defaultType() != Void.class) {
return (Codec<T>) new SelectFromCodec(type, settings
.selectFrom(), context, codecFactory,
hideChoices(metadata));