YANGTOOLS-829: add parser support for openconfig-hashed-value
[yangtools.git] / yang / openconfig-parser-support / src / main / java / org / opendaylight / yangtools / openconfig / parser / OpenConfig.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, 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.yangtools.openconfig.parser;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import java.util.Collection;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport;
14
15 /**
16  * Primary entry point into this implementation. Use {@link #getStatements()} to acquire a collection of
17  * {@link StatementSupport} instances, which need to be registered with the parser.
18  *
19  * @author Robert Varga
20  */
21 @Beta
22 public final class OpenConfig {
23
24     private OpenConfig() {
25         throw new UnsupportedOperationException();
26     }
27
28     /**
29      * Return a collection of statements which need to be added into parser reactor to enable support for OpenConfig
30      * YANG extensions.
31      *
32      * @return Collection of statements to be added.
33      */
34     public static Collection<StatementSupport<?, ?, ?>> getStatements() {
35         return ImmutableList.of(HashedValue.getHashedInstance(), HashedValue.getEncryptedInstance());
36     }
37 }