Add BitsTypeObject
[mdsal.git] / binding / mdsal-binding-model-ri / src / main / java / org / opendaylight / mdsal / binding / model / ri / TypeConstants.java
1 /*
2  * Copyright (c) 2014 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.mdsal.binding.model.ri;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.binding.BitsTypeObject;
12 import org.opendaylight.yangtools.yang.binding.ScalarTypeObject;
13
14 /**
15  * Contains constants used in relations with <code>Type</code>.
16  */
17 public final class TypeConstants {
18     /**
19      * Name or prefix (multiple patterns in builder class as composed with '_' and upper case of the field name) of the
20      * class constant which holds the map of regular expressions that need to be enforced on the string value. The map
21      * is keyed by Pattern-compatible string and values are XSD-compatible strings.
22      */
23     public static final @NonNull String PATTERN_CONSTANT_NAME = "PATTERN_CONSTANTS";
24
25     /**
26      * Name of the property holding the value encapsulated in a {@link ScalarTypeObject}.
27      */
28     public static final @NonNull String VALUE_PROP = "value";
29
30     /**
31      * Name of the constant holding the names of valid {@code bit}s in a {@link BitsTypeObject}. This constant is
32      * protected and made accessible via {@link BitsTypeObject#validNames()} and its type matches the return type
33      * exactly.
34      */
35     public static final @NonNull String VALID_NAMES_NAME = "VALID_NAMES";
36
37     private TypeConstants() {
38         // Hidden on purpose
39     }
40 }