2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.parser.builder.api;
10 import java.util.List;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13 import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
14 import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
15 import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
18 * Interface for builders of 'typedef' statement.
20 * @deprecated Pre-Beryllium implementation, scheduled for removal.
23 public interface TypeDefinitionBuilder extends TypeAwareBuilder, SchemaNodeBuilder, GroupingMember {
26 * Sets QName for resulting type definition.
28 * @param qname QName of resulting type
30 void setQName(QName qname);
33 TypeDefinition<?> build();
37 * Returns range restrictions of resulting type definition.
39 * @return range restrictions of resulting type definition.
41 List<RangeConstraint> getRanges();
44 * Set Range restrictions for resulting type definition.
47 * Range restrictions of resulting type definition.
49 void setRanges(List<RangeConstraint> ranges);
53 * Returns length restrictions of resulting type definition.
55 * @return length restrictions of resulting type definition.
57 List<LengthConstraint> getLengths();
60 * Set length restrictions for resulting type definition.
63 * Length restrictions of resulting type definition.
65 void setLengths(List<LengthConstraint> lengths);
69 * Returns pattern restrictions of resulting type definition.
71 * @return range restrictions of resulting type definition.
73 List<PatternConstraint> getPatterns();
76 * Set pattern restrictions for resulting type definition.
79 * patterns restrictions of resulting type definition.
81 void setPatterns(List<PatternConstraint> patterns);
85 * Returns fractions digits of resulting type if it is derived
86 * from <code>decimal</code> built-in type.
88 * @return fractions digits of resulting type
90 Integer getFractionDigits();
93 * Sets fractions digits of resulting type if it is derived from
94 * <code>decimal</code> built-in type.
96 * @param fractionDigits fraction digits
98 void setFractionDigits(Integer fractionDigits);
102 * Returns default value of resulting type
104 * @return default value of resulting type
106 Object getDefaultValue();
110 * Sets default value of resulting type
112 * @param defaultValue Default value of resulting type
114 void setDefaultValue(Object defaultValue);
117 * Gets unit definition for resulting type
119 * @return unit definition for resulting type
124 * Sets units definition for resulting type
126 * @param units units definition for resulting type
128 void setUnits(String units);