Convert mdsal-binding-dom-codec to a JPMS module
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / di / DefaultBindingCodecTreeFactory.java
1 /*
2  * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.dom.codec.impl.di;
9
10 import com.google.common.annotations.Beta;
11 import javax.inject.Inject;
12 import javax.inject.Singleton;
13 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree;
14 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory;
15 import org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext;
16 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
17
18 /**
19  * Default implementation of {@link BindingCodecTreeFactory}.
20  */
21 @Beta
22 @Singleton
23 public final class DefaultBindingCodecTreeFactory implements BindingCodecTreeFactory {
24     @Inject
25     public DefaultBindingCodecTreeFactory() {
26         // Exposed for DI
27     }
28
29     @Override
30     public BindingCodecTree create(final BindingRuntimeContext context) {
31         return new BindingCodecContext(context);
32     }
33 }