X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang%2Fmodel%2Futil%2FUint8.java;h=c369e037763c7ec821cac453dfe9a413d70d1901;hb=1e9531138e44cd757ca27b0d86e98eccb22ccd82;hp=aa1e6cacfbf3e315b0604d35114df1360f6e325b;hpb=11b0c275f1abb01bac9b122895a002c8e7905de1;p=controller.git diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint8.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint8.java index aa1e6cacfb..c369e03776 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint8.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Uint8.java @@ -7,11 +7,10 @@ */ package org.opendaylight.controller.yang.model.util; -import java.net.URI; -import java.util.Date; import java.util.List; import org.opendaylight.controller.yang.common.QName; +import org.opendaylight.controller.yang.model.api.SchemaPath; import org.opendaylight.controller.yang.model.api.type.RangeConstraint; import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefinition; @@ -23,28 +22,34 @@ import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefini * * @see AbstractUnsignedInteger */ -public class Uint8 extends AbstractUnsignedInteger { +public final class Uint8 extends AbstractUnsignedInteger { private static final QName name = BaseTypes.constructQName("uint8"); private Short defaultValue = null; private static final String description = "uint8 represents integer values between 0 and 255, inclusively."; + private final UnsignedIntegerTypeDefinition baseType; - public Uint8(final List actualPath, - final URI namespace, final Date revision) { - super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + private Uint8() { + super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = this; } - public Uint8(final List actualPath, - final URI namespace, final Date revision, final Short defaultValue) { - super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + public Uint8(final SchemaPath path) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = new Uint8(); + } + + public Uint8(final SchemaPath path, final Short defaultValue) { + super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, ""); + this.baseType = new Uint8(); this.defaultValue = defaultValue; } - public Uint8(final List actualPath, - final URI namespace, final Date revision, final List rangeStatements, + public Uint8(final SchemaPath path, final List rangeStatements, final String units, final Short defaultValue) { - super(actualPath, namespace, revision, name, description, rangeStatements, units); + super(path, name, description, rangeStatements, units); + this.baseType = new Uint8(); this.defaultValue = defaultValue; } @@ -55,7 +60,7 @@ public class Uint8 extends AbstractUnsignedInteger { */ @Override public UnsignedIntegerTypeDefinition getBaseType() { - return this; + return baseType; } /*