- @Override
- @SuppressWarnings("checkstyle:illegalCatch")
- public BindingCodecTree create(final SchemaContext context, final Class<?>... bindingClasses) {
- final ModuleInfoBackedContext strategy = ModuleInfoBackedContext.create();
- for (final Class<?> bindingCls : bindingClasses) {
- try {
- strategy.registerModuleInfo(BindingReflections.getModuleInfo(bindingCls));
- } catch (final Exception e) {
- throw new IllegalStateException(
- "Could not create BindingRuntimeContext from class " + bindingCls.getName(), e);
- }
- }
- final BindingRuntimeContext runtimeCtx = BindingRuntimeContext.create(strategy, context);
- return create(runtimeCtx);
- }
-
-