use of org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator in project controller by opendaylight.
the class BindingNormalizedCodecTest method setupWithSchema.
@Override
protected void setupWithSchema(final SchemaContext schemaContext) {
this.context = schemaContext;
final DataObjectSerializerGenerator streamWriter = StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
final BindingNormalizedNodeCodecRegistry registry = new BindingNormalizedNodeCodecRegistry(streamWriter);
this.codec = new BindingToNormalizedNodeCodec(GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy(), registry, true);
}
use of org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator in project bgpcep by opendaylight.
the class AbstractRIBTestSetup method createCodecFactory.
private static BindingCodecTreeFactory createCodecFactory(final ClassLoadingStrategy str, final SchemaContext ctx) {
final DataObjectSerializerGenerator generator = StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
final BindingNormalizedNodeCodecRegistry codec = new BindingNormalizedNodeCodecRegistry(generator);
codec.onBindingRuntimeContextUpdated(BindingRuntimeContext.create(str, ctx));
return codec;
}
use of org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator in project controller by opendaylight.
the class BindingTestContext method startBindingToDomMappingService.
public void startBindingToDomMappingService() {
checkState(this.classPool != null, "ClassPool needs to be present");
final DataObjectSerializerGenerator generator = StreamWriterGenerator.create(JavassistUtils.forClassPool(this.classPool));
final BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(generator);
final GeneratedClassLoadingStrategy loading = GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy();
this.codec = new BindingToNormalizedNodeCodec(loading, codecRegistry);
this.mockSchemaService.registerSchemaContextListener(this.codec);
}
Aggregations