return processTraits( core, trait, builder, needsWrapping, inner, logical );
}
protected <K> TraitableBean<K,CoreWrapper<K>> asTraitable( K core, TraitFactory builder ) {
if ( core instanceof Map ) {
return new MapCore( (Map) core );
}
CoreWrapper<K> wrapper = builder.getCoreWrapper( core.getClass() );
if ( wrapper == null ) {
throw new UnsupportedOperationException( "Error: cannot apply a trait to non-traitable class " + core.getClass() );
}