YANGTOOLS-706: Split out yang-parser-rfc7950
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / thirdparty / plugin / CustomInferencePipeline.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.yangtools.yang.thirdparty.plugin;
9
10 import static org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.sourceLocal;
11
12 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase;
14 import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
15
16 public final class CustomInferencePipeline {
17     public static final CrossSourceStatementReactor CUSTOM_REACTOR = RFC7950Reactors.defaultReactorBuilder()
18             .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, ThirdPartyExtensionSupport.getInstance())
19             .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, sourceLocal(ThirdPartyNamespace.class))
20             .build();
21
22     private CustomInferencePipeline() {
23         throw new UnsupportedOperationException("Utility class");
24     }
25 }