Bug 5200: Yang parser doesn't fill error-app-tag and error-message in constraints
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / BuiltinEffectiveStatements.java
1 /*
2  * Copyright (c) 2015 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.yang.parser.stmt.rfc6020.effective.type;
9
10 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
11 import org.opendaylight.yangtools.yang.model.api.stmt.TypeEffectiveStatement;
12 import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
13 import org.opendaylight.yangtools.yang.model.util.type.BaseTypes;
14
15 public final class BuiltinEffectiveStatements {
16     private BuiltinEffectiveStatements() {
17         throw new UnsupportedOperationException();
18     }
19
20     public static final TypeEffectiveStatement<TypeStatement> BINARY = new AbstractBuiltinEffectiveStatement() {
21         @Override
22         public TypeDefinition<?> getTypeDefinition() {
23             return BaseTypes.binaryType();
24         }
25     };
26     public static final TypeEffectiveStatement<TypeStatement> BOOLEAN = new AbstractBuiltinEffectiveStatement() {
27         @Override
28         public TypeDefinition<?> getTypeDefinition() {
29             return BaseTypes.booleanType();
30         }
31     };
32     public static final TypeEffectiveStatement<TypeStatement> EMPTY = new AbstractBuiltinEffectiveStatement() {
33         @Override
34         public TypeDefinition<?> getTypeDefinition() {
35             return BaseTypes.emptyType();
36         }
37     };
38     public static final TypeEffectiveStatement<TypeStatement> INSTANCE_IDENTIFIER = new AbstractBuiltinEffectiveStatement() {
39         @Override
40         public TypeDefinition<?> getTypeDefinition() {
41             return BaseTypes.instanceIdentifierType();
42         }
43     };
44     public static final TypeEffectiveStatement<TypeStatement> INT8 = new AbstractBuiltinEffectiveStatement() {
45         @Override
46         public TypeDefinition<?> getTypeDefinition() {
47             return BaseTypes.int8Type();
48         }
49     };
50     public static final TypeEffectiveStatement<TypeStatement> INT16 = new AbstractBuiltinEffectiveStatement() {
51         @Override
52         public TypeDefinition<?> getTypeDefinition() {
53             return BaseTypes.int16Type();
54         }
55     };
56     public static final TypeEffectiveStatement<TypeStatement> INT32 = new AbstractBuiltinEffectiveStatement() {
57         @Override
58         public TypeDefinition<?> getTypeDefinition() {
59             return BaseTypes.int32Type();
60         }
61     };
62     public static final TypeEffectiveStatement<TypeStatement> INT64 = new AbstractBuiltinEffectiveStatement() {
63         @Override
64         public TypeDefinition<?> getTypeDefinition() {
65             return BaseTypes.int64Type();
66         }
67     };
68     public static final TypeEffectiveStatement<TypeStatement> STRING = new AbstractBuiltinEffectiveStatement() {
69         @Override
70         public TypeDefinition<?> getTypeDefinition() {
71             return BaseTypes.stringType();
72         }
73     };
74     public static final TypeEffectiveStatement<TypeStatement> UINT8 = new AbstractBuiltinEffectiveStatement() {
75         @Override
76         public TypeDefinition<?> getTypeDefinition() {
77             return BaseTypes.uint8Type();
78         }
79     };
80     public static final TypeEffectiveStatement<TypeStatement> UINT16 = new AbstractBuiltinEffectiveStatement() {
81         @Override
82         public TypeDefinition<?> getTypeDefinition() {
83             return BaseTypes.uint16Type();
84         }
85     };
86     public static final TypeEffectiveStatement<TypeStatement> UINT32 = new AbstractBuiltinEffectiveStatement() {
87         @Override
88         public TypeDefinition<?> getTypeDefinition() {
89             return BaseTypes.uint32Type();
90         }
91     };
92     public static final TypeEffectiveStatement<TypeStatement> UINT64 = new AbstractBuiltinEffectiveStatement() {
93         @Override
94         public TypeDefinition<?> getTypeDefinition() {
95             return BaseTypes.uint64Type();
96         }
97     };
98 }