Search in sources :

Example 1 with GeneratedClassLoadingStrategy

use of org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy 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);
}
Also used : GeneratedClassLoadingStrategy(org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy) BindingToNormalizedNodeCodec(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec) BindingNormalizedNodeCodecRegistry(org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry) DataObjectSerializerGenerator(org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator)

Aggregations

BindingToNormalizedNodeCodec (org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec)1 DataObjectSerializerGenerator (org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator)1 BindingNormalizedNodeCodecRegistry (org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry)1 GeneratedClassLoadingStrategy (org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy)1