Revert "Add support for rebinding type definitions" 04/95104/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Feb 2021 07:09:56 +0000 (08:09 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Feb 2021 07:11:09 +0000 (08:11 +0100)
This reverts commit ad603ee9df18aee0e58d83ae207846c8b9bd0d58, as
the rules for how copying needs to work are not clear and this
facility is not used.

JIRA: YANGTOOLS-1213
Change-Id: Ibbcc2a1ca40ceaaf0baaf58b07b275a359fad8bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
56 files changed:
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractBaseType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractDerivedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractLengthRestrictedDerivedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractLengthRestrictedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractRangeRestrictedBaseType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractRangeRestrictedDerivedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractRangeRestrictedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractRestrictedType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/AbstractTypeDefinition.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseBitsType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseDecimalType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseEnumerationType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseIdentityrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseInt32Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseLeafrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/BaseUnionType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedBinaryType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedBitsType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedBooleanType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedDecimalType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedEmptyType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedEnumerationType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedIdentityrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedInstanceIdentifierType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedInt16Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedInt32Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedInt64Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedInt8Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedLeafrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedStringType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedUint16Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedUint32Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedUint64Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedUint8Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/DerivedUnionType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedBinaryType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedBitsType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedBooleanType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedDecimalType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedEmptyType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedEnumerationType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedIdentityrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedInstanceIdentifierType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedInt16Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedInt32Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedInt64Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedInt8Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedLeafrefType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedStringType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedUint16Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedUint32Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedUint64Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedUint8Type.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/RestrictedUnionType.java
yang/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/type/TypeBuilder.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractLeafListEffectiveStatement.java

index 34189bd18037be33d903e351be66340801ceaf45..bc6865279741eb302e5905474384d329f9930bf1 100644 (file)
@@ -24,10 +24,6 @@ abstract class AbstractBaseType<T extends TypeDefinition<T>> extends AbstractTyp
         super(qname, unknownSchemaNodes);
     }
 
-    AbstractBaseType(final AbstractBaseType<T> original, final QName qname) {
-        super(original, qname);
-    }
-
     @Override
     public final T getBaseType() {
         return null;
@@ -57,11 +53,4 @@ abstract class AbstractBaseType<T extends TypeDefinition<T>> extends AbstractTyp
     public final Status getStatus() {
         return Status.CURRENT;
     }
-
-    @Override
-    T bindTo(final QName newName) {
-        // Most implementations just return self
-        // FIXME: or do we want to assert?
-        return (T) this;
-    }
 }
index decd61b7bded7806ae02b3c1973e5ff059fa23e7..29addb101dc72e20ebd8ecb2208ef74179fd85cc 100644 (file)
@@ -38,16 +38,6 @@ abstract class AbstractDerivedType<T extends TypeDefinition<T>> extends Abstract
         this.units = units;
     }
 
-    AbstractDerivedType(final AbstractDerivedType<T> original, final QName qname) {
-        super(original, qname);
-        this.baseType = original.baseType;
-        this.status = original.status;
-        this.defaultValue = original.defaultValue;
-        this.description = original.description;
-        this.reference = original.reference;
-        this.units = original.units;
-    }
-
     @Override
     public final T getBaseType() {
         return baseType instanceof AbstractRestrictedType ? baseType.getBaseType() : baseType;
index bf467d0ad6d22c845e91fdf4d62b07d98c0bf44f..da7243834071f869a1477f0d740dc224d9daf35a 100644 (file)
@@ -23,10 +23,6 @@ abstract class AbstractLengthRestrictedDerivedType<T extends LengthRestrictedTyp
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    AbstractLengthRestrictedDerivedType(final AbstractLengthRestrictedDerivedType<T> original, final QName qname) {
-        super(original, qname);
-    }
-
     @Override
     public final Optional<LengthConstraint> getLengthConstraint() {
         return baseType().getLengthConstraint();
index cf63671fc01624fb844080779dfe999e2c44cfd5..2d6b9ffd77f63af1b69eb8e037956a129f0734ad 100644 (file)
@@ -26,11 +26,6 @@ abstract class AbstractLengthRestrictedType<T extends LengthRestrictedTypeDefini
         this.lengthConstraint = lengthConstraint;
     }
 
-    AbstractLengthRestrictedType(final AbstractLengthRestrictedType<T> original, final QName qname) {
-        super(original, qname);
-        this.lengthConstraint = original.lengthConstraint;
-    }
-
     @Override
     public final Optional<LengthConstraint> getLengthConstraint() {
         return Optional.ofNullable(lengthConstraint);
index c049d1bebac7f0a3f60c2fbf8f6af7a09569dfb1..3cde092fed0639f1c56a3e10b6c6f5479bfb8e85 100644 (file)
@@ -58,11 +58,6 @@ abstract class AbstractRangeRestrictedBaseType<T extends RangeRestrictedTypeDefi
         this.rangeConstraint = requireNonNull(rangeConstraint);
     }
 
-    AbstractRangeRestrictedBaseType(final AbstractRangeRestrictedBaseType<T, N> original, final QName qname) {
-        super(original, qname);
-        this.rangeConstraint = original.rangeConstraint;
-    }
-
     @Override
     public final Optional<RangeConstraint<N>> getRangeConstraint() {
         return Optional.of(rangeConstraint);
index f138a64cec3b3d975338b9710e2d27b4a70388d9..b12e0dc1778da51fd3a6c96e3bb59198b3190cda 100644 (file)
@@ -25,10 +25,6 @@ abstract class AbstractRangeRestrictedDerivedType<T extends RangeRestrictedTypeD
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    AbstractRangeRestrictedDerivedType(final AbstractRangeRestrictedDerivedType<T, N> original, final QName qname) {
-        super(original, qname);
-    }
-
     @Override
     public final Optional<RangeConstraint<N>> getRangeConstraint() {
         return baseType().getRangeConstraint();
index 2c94f91bd68d4514ad589f51ddd1d4f6d3b4818d..96e4096daa26ddd596ec6e7295b22a03dde1edb1 100644 (file)
@@ -27,11 +27,6 @@ abstract class AbstractRangeRestrictedType<T extends RangeRestrictedTypeDefiniti
         this.rangeConstraint = rangeConstraint;
     }
 
-    AbstractRangeRestrictedType(final AbstractRangeRestrictedType<T, N> original, final QName qname) {
-        super(original, qname);
-        this.rangeConstraint = original.rangeConstraint;
-    }
-
     @Override
     public final Optional<RangeConstraint<N>> getRangeConstraint() {
         return Optional.ofNullable(rangeConstraint);
index bb100b570b218b00e048b815d4fcf173e2cf242a..f8b0b1582850aaa10ca704407a6ae65a4ef8341e 100644 (file)
@@ -26,11 +26,6 @@ abstract class AbstractRestrictedType<T extends TypeDefinition<T>> extends Abstr
         this.baseType = requireNonNull(baseType);
     }
 
-    AbstractRestrictedType(final AbstractRestrictedType<T> original, final QName qname) {
-        super(original, qname);
-        this.baseType = original.baseType;
-    }
-
     @Override
     public final T getBaseType() {
         return baseType;
index 092dfd5216d080250ea8a5eab8714140207dc8d4..e3745d18c800d27ed3d82715b56a91fd1165ab14 100644 (file)
@@ -26,11 +26,6 @@ abstract class AbstractTypeDefinition<T extends TypeDefinition<T>> implements Im
         this.unknownSchemaNodes = ImmutableList.copyOf(unknownSchemaNodes);
     }
 
-    AbstractTypeDefinition(final AbstractTypeDefinition<T> original, final QName qname) {
-        this.unknownSchemaNodes = original.unknownSchemaNodes;
-        this.qname = requireNonNull(qname);
-    }
-
     @Override
     public final QName getQName() {
         return qname;
@@ -41,15 +36,6 @@ abstract class AbstractTypeDefinition<T extends TypeDefinition<T>> implements Im
         return unknownSchemaNodes;
     }
 
-    /**
-     * Bind this type definition to a new {@link QName}. The resulting definition will be equivalent to this definition
-     * in all aspects except its path.
-     *
-     * @param newQName New {@link QName} to use
-     * @return Bound type definition
-     */
-    abstract @NonNull T bindTo(@NonNull QName newQName);
-
     @Override
     public abstract String toString();
 
index 1658a2957b6e099bf8eb43e0b69601d4d1662652..65b155faebd6a5b53ea0508ebb6243b97459101c 100644 (file)
@@ -23,16 +23,6 @@ final class BaseBitsType extends AbstractBaseType<BitsTypeDefinition> implements
         this.bits = ImmutableList.copyOf(bits);
     }
 
-    private BaseBitsType(final BaseBitsType original, final QName qname) {
-        super(original, qname);
-        this.bits = original.bits;
-    }
-
-    @Override
-    BaseBitsType bindTo(final QName newQName) {
-        return new BaseBitsType(this, newQName);
-    }
-
     @Override
     public Collection<? extends Bit> getBits() {
         return bits;
index 1e648ea213c0f41dc2f683551692f66ab72dd398..0c5d4f72274136ee9d49eb4c8ca71d25cf6d546d 100644 (file)
@@ -83,16 +83,6 @@ final class BaseDecimalType extends AbstractRangeRestrictedBaseType<DecimalTypeD
         this.fractionDigits = fractionDigits;
     }
 
-    private BaseDecimalType(final BaseDecimalType original, final QName qname) {
-        super(original, qname);
-        this.fractionDigits = original.fractionDigits;
-    }
-
-    @Override
-    BaseDecimalType bindTo(final QName newQName) {
-        return new BaseDecimalType(this, newQName);
-    }
-
     @Override
     public int getFractionDigits() {
         return fractionDigits;
index 5c238822fe1251846d6384b527aba8d2a4410b28..0c9e52edb375f3c3ade6fa7ea46f78921b43fb69 100644 (file)
@@ -24,16 +24,6 @@ final class BaseEnumerationType extends AbstractBaseType<EnumTypeDefinition> imp
         this.values = ImmutableList.copyOf(values);
     }
 
-    private BaseEnumerationType(final BaseEnumerationType original, final QName qname) {
-        super(original, qname);
-        this.values = original.values;
-    }
-
-    @Override
-    BaseEnumerationType bindTo(final QName newQName) {
-        return new BaseEnumerationType(this, newQName);
-    }
-
     @Override
     public List<EnumPair> getValues() {
         return values;
index 6ecd10d3434cf63799f96c2577aa46c0c2fa7209..44ddc520bba1fce8f90ef9f248ea86e270756a41 100644 (file)
@@ -27,16 +27,6 @@ final class BaseIdentityrefType extends AbstractBaseType<IdentityrefTypeDefiniti
         this.identities = requireNonNull(identities);
     }
 
-    private BaseIdentityrefType(final BaseIdentityrefType original, final QName qname) {
-        super(original, qname);
-        this.identities = original.identities;
-    }
-
-    @Override
-    BaseIdentityrefType bindTo(final QName newQName) {
-        return new BaseIdentityrefType(this, newQName);
-    }
-
     @Override
     public Set<? extends IdentitySchemaNode> getIdentities() {
         return identities;
index 2400f92145cb41b95e59a4687c1f6ce3f5f2138d..d4904eb4cc800c9ae615d38deb804e127dd3b118 100644 (file)
@@ -32,4 +32,5 @@ final class BaseInt32Type extends AbstractRangeRestrictedBaseType<Int32TypeDefin
     public String toString() {
         return Int32TypeDefinition.toString(this);
     }
+
 }
index d05555b7f7a2fd119018c0cf19e2dba8516a96da..7608f0e0c9159db2d2fe6a3b92b2bbe497f0cea2 100644 (file)
@@ -26,17 +26,6 @@ final class BaseLeafrefType extends AbstractBaseType<LeafrefTypeDefinition> impl
         this.requireInstance = requireInstance;
     }
 
-    private BaseLeafrefType(final BaseLeafrefType original, final QName qname) {
-        super(original, qname);
-        this.pathStatement = original.pathStatement;
-        this.requireInstance = original.requireInstance;
-    }
-
-    @Override
-    BaseLeafrefType bindTo(final QName newQName) {
-        return new BaseLeafrefType(this, newQName);
-    }
-
     @Override
     public PathExpression getPathStatement() {
         return pathStatement;
index d681107e1cd497482f1da4b7ad02dd7bd237ee5b..9172971aa8a230bc32312d7044aa3acf7bd18cc0 100644 (file)
@@ -24,16 +24,6 @@ final class BaseUnionType extends AbstractBaseType<UnionTypeDefinition> implemen
         this.types = ImmutableList.copyOf(types);
     }
 
-    private BaseUnionType(final BaseUnionType original, final QName qname) {
-        super(original, qname);
-        this.types = original.types;
-    }
-
-    @Override
-    BaseUnionType bindTo(final QName newQName) {
-        return new BaseUnionType(this, newQName);
-    }
-
     @Override
     public List<TypeDefinition<?>> getTypes() {
         return types;
index f4f572775586b1efa253f9a32930973d4052b2c4..ceab0654f2021ef44320fa308270cd89b9fa96e7 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedBinaryType extends AbstractLengthRestrictedDerivedType<Binary
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedBinaryType(final DerivedBinaryType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedBinaryType bindTo(final QName newQName) {
-        return new DerivedBinaryType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return BinaryTypeDefinition.hashCode(this);
index 50bc600fa4ce6192bd685536d170c2fcdc0cec9e..1ef96a157742d2b6b88c7f65ae1979c7f3d7a5e2 100644 (file)
@@ -20,15 +20,6 @@ final class DerivedBitsType extends AbstractDerivedType<BitsTypeDefinition> impl
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedBitsType(final DerivedBitsType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedBitsType bindTo(final QName newQName) {
-        return new DerivedBitsType(this, newQName);
-    }
-
     @Override
     public Collection<? extends Bit> getBits() {
         return baseType().getBits();
index be14562d5e465fd451229a09385450e9650e89d9..85d6f9ad197286b75eed453d7f81ce1eac1f2c38 100644 (file)
@@ -20,15 +20,6 @@ final class DerivedBooleanType extends AbstractDerivedType<BooleanTypeDefinition
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedBooleanType(final DerivedBooleanType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedBooleanType bindTo(final QName newQName) {
-        return new DerivedBooleanType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return BooleanTypeDefinition.hashCode(this);
index db33512c574276aa32aef64f9d529923d6755cf7..2a912b36916236d276a51489467b6e55cbfbfeae 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedDecimalType extends AbstractRangeRestrictedDerivedType<Decima
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedDecimalType(final DerivedDecimalType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedDecimalType bindTo(final QName newQName) {
-        return new DerivedDecimalType(this, newQName);
-    }
-
     @Override
     public int getFractionDigits() {
         return baseType().getFractionDigits();
index ddd1d57d394a1b495786f954b4f71b21a3597dec..a5c9ad74df4182f0fc5728d9175ef62bfd1d4d3e 100644 (file)
@@ -15,20 +15,11 @@ import org.opendaylight.yangtools.yang.model.api.type.EmptyTypeDefinition;
 
 final class DerivedEmptyType extends AbstractDerivedType<EmptyTypeDefinition> implements EmptyTypeDefinition {
     DerivedEmptyType(final EmptyTypeDefinition baseType, final QName qname, final Object defaultValue,
-            final String description, final String reference, final Status status, final String units,
-            final Collection<? extends UnknownSchemaNode> unknownSchemNodes) {
+        final String description, final String reference, final Status status, final String units,
+        final Collection<? extends UnknownSchemaNode> unknownSchemNodes) {
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedEmptyType(final DerivedEmptyType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedEmptyType bindTo(final QName newQName) {
-        return new DerivedEmptyType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return EmptyTypeDefinition.hashCode(this);
index a0722ffb9664951dcfcd3e529f48c13c5f77e3be..212be1206b30376f8713af25ec84d9b76d5385ac 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedEnumerationType extends AbstractDerivedType<EnumTypeDefinitio
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
     }
 
-    private DerivedEnumerationType(final DerivedEnumerationType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedEnumerationType bindTo(final QName newQName) {
-        return new DerivedEnumerationType(this, newQName);
-    }
-
     @Override
     public List<EnumPair> getValues() {
         return baseType().getValues();
index 21e2f1e335e4a8ad4b3ad7aa8d38046dc7dde9c8..39092d6124ed8faffa592e2b9ea4712f9198980c 100644 (file)
@@ -23,15 +23,6 @@ final class DerivedIdentityrefType extends AbstractDerivedType<IdentityrefTypeDe
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedIdentityrefType(final DerivedIdentityrefType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedIdentityrefType bindTo(final QName newQName) {
-        return new DerivedIdentityrefType(this, newQName);
-    }
-
     @Override
     public Set<? extends IdentitySchemaNode> getIdentities() {
         return baseType().getIdentities();
index 61f8bbea078d01ad9b13acae1a54233d13b868e5..272aa5c5885058d1dca9df073783db7cd36c8b3e 100644 (file)
@@ -25,16 +25,6 @@ final class DerivedInstanceIdentifierType extends AbstractDerivedType<InstanceId
         this.requireInstance = requireInstance;
     }
 
-    private DerivedInstanceIdentifierType(final DerivedInstanceIdentifierType original, final QName qname) {
-        super(original, qname);
-        this.requireInstance = original.requireInstance;
-    }
-
-    @Override
-    DerivedInstanceIdentifierType bindTo(final QName newQName) {
-        return new DerivedInstanceIdentifierType(this, newQName);
-    }
-
     @Override
     public boolean requireInstance() {
         return requireInstance;
index cdbef0b6b3517d789fa9307e8c807e645eca2da1..81e43a0bfe5792dd869947f8892d56665008d59d 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedInt16Type extends AbstractRangeRestrictedDerivedType<Int16Typ
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedInt16Type(final DerivedInt16Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedInt16Type bindTo(final QName newQName) {
-        return new DerivedInt16Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int16TypeDefinition.hashCode(this);
index 52f5bdf7bd8ad6c5410e647b2fe0f43ef041d93f..627c4ca6e3bb20069597c463037fce0a7cf05cb2 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedInt32Type extends AbstractRangeRestrictedDerivedType<Int32Typ
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedInt32Type(final DerivedInt32Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedInt32Type bindTo(final QName newQName) {
-        return new DerivedInt32Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int32TypeDefinition.hashCode(this);
index e67a9955ed6139bd9a67f6ad243168c8e10edc6d..8d1cef194bfa41de1a80821123f4103f3ac2408d 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedInt64Type extends AbstractRangeRestrictedDerivedType<Int64Typ
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedInt64Type(final DerivedInt64Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedInt64Type bindTo(final QName newQName) {
-        return new DerivedInt64Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int64TypeDefinition.hashCode(this);
index c577ed42fe363548b4687ae65c42b8f43071bfbd..17056c211353bd1298e8c8c908ef825e338171a3 100644 (file)
@@ -21,15 +21,6 @@ final class DerivedInt8Type extends AbstractRangeRestrictedDerivedType<Int8TypeD
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedInt8Type(final DerivedInt8Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedInt8Type bindTo(final QName newQName) {
-        return new DerivedInt8Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int8TypeDefinition.hashCode(this);
index eb3cfb40cd5dfae710bcd33d4b2aea4d2f7ee799..6edcabe1eb618af145571430b68bd2d8787e1833 100644 (file)
@@ -16,20 +16,11 @@ import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
 
 final class DerivedLeafrefType extends AbstractDerivedType<LeafrefTypeDefinition> implements LeafrefTypeDefinition {
     DerivedLeafrefType(final LeafrefTypeDefinition baseType, final QName qname, final Object defaultValue,
-            final String description, final String reference, final Status status, final String units,
-            final Collection<? extends UnknownSchemaNode> unknownSchemaNodes) {
+        final String description, final String reference, final Status status, final String units,
+        final Collection<? extends UnknownSchemaNode> unknownSchemaNodes) {
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedLeafrefType(final DerivedLeafrefType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedLeafrefType bindTo(final QName newQName) {
-        return new DerivedLeafrefType(this, newQName);
-    }
-
     @Override
     public PathExpression getPathStatement() {
         return baseType().getPathStatement();
index 9eff8bdfc71998c09435715ff6e41939d03c5671..58ae421b054f5224a0014b192b47d15d52ee16c0 100644 (file)
@@ -23,15 +23,6 @@ final class DerivedStringType extends AbstractLengthRestrictedDerivedType<String
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedStringType(final DerivedStringType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedStringType bindTo(final QName newQName) {
-        return new DerivedStringType(this, newQName);
-    }
-
     @Override
     public List<PatternConstraint> getPatternConstraints() {
         return baseType().getPatternConstraints();
index 5127ea95bab3816ee09e11c5cb8814e7158f0e97..a5a19c6bff69c589ad3f9198df958bc9a076037a 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedUint16Type extends AbstractRangeRestrictedDerivedType<Uint16T
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedUint16Type(final DerivedUint16Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedUint16Type bindTo(final QName newQName) {
-        return new DerivedUint16Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint16TypeDefinition.hashCode(this);
index f73205954f4a4a2a8467080e7da49151117f5b88..84d0619530a999573fd2f264c7d77fab03f5a578 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedUint32Type extends AbstractRangeRestrictedDerivedType<Uint32T
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedUint32Type(final DerivedUint32Type original, final QName newQName) {
-        super(original, newQName);
-    }
-
-    @Override
-    DerivedUint32Type bindTo(final QName newQName) {
-        return new DerivedUint32Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint32TypeDefinition.hashCode(this);
index 8ed6a4d96882da3a65ebbda8681585e0d044dad1..eba05edefa70c32f74bc350e1a02c21661b78911 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedUint64Type extends AbstractRangeRestrictedDerivedType<Uint64T
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedUint64Type(final DerivedUint64Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedUint64Type bindTo(final QName newQName) {
-        return new DerivedUint64Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint64TypeDefinition.hashCode(this);
index 1bd390066170b32c335a1aa8661087298fc93ef6..588e1335bfdf12f3b4ed6fbcb810ae7d949cea88 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedUint8Type extends AbstractRangeRestrictedDerivedType<Uint8Typ
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedUint8Type(final DerivedUint8Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedUint8Type bindTo(final QName newQName) {
-        return new DerivedUint8Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint8TypeDefinition.hashCode(this);
index 9c2ecdce14091223e53fb023437cb88380b203ae..2dfaa9d83de97d8335a32d0b0110b93c69a03088 100644 (file)
@@ -22,15 +22,6 @@ final class DerivedUnionType extends AbstractDerivedType<UnionTypeDefinition> im
         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
     }
 
-    private DerivedUnionType(final DerivedUnionType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    DerivedUnionType bindTo(final QName newQName) {
-        return new DerivedUnionType(this, newQName);
-    }
-
     @Override
     public List<TypeDefinition<?>> getTypes() {
         return baseType().getTypes();
index bf8e3c1929fe4ff4457406cee59217022f8fdeee..226e6f962ea21ce13aa40a896c0321add194a74d 100644 (file)
@@ -22,15 +22,6 @@ final class RestrictedBinaryType extends AbstractLengthRestrictedType<BinaryType
         super(baseType, qname, unknownSchemaNodes, lengthConstraint);
     }
 
-    private RestrictedBinaryType(final RestrictedBinaryType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedBinaryType bindTo(final QName newQName) {
-        return new RestrictedBinaryType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return BinaryTypeDefinition.hashCode(this);
index e38af508156390b206fdbc68b0563ffca916cfbb..37f1d0aec8dfe4d935ba9d5a0dbe02be1e11b720 100644 (file)
@@ -23,16 +23,6 @@ final class RestrictedBitsType extends AbstractRestrictedType<BitsTypeDefinition
         this.bits = ImmutableList.copyOf(bits);
     }
 
-    private RestrictedBitsType(final RestrictedBitsType original, final QName qname) {
-        super(original, qname);
-        this.bits = original.bits;
-    }
-
-    @Override
-    RestrictedBitsType bindTo(final QName newQName) {
-        return new RestrictedBitsType(this, newQName);
-    }
-
     @Override
     public Collection<? extends Bit> getBits() {
         return bits;
index 66825ab3af8b9cfac42f2b9b983b4aa300c2b643..1e6d8242460a994275ddeaf8b75bed409a823d7f 100644 (file)
@@ -19,15 +19,6 @@ final class RestrictedBooleanType extends AbstractRestrictedType<BooleanTypeDefi
         super(baseType, qname, unknownSchemaNodes);
     }
 
-    private RestrictedBooleanType(final RestrictedBooleanType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedBooleanType bindTo(final QName newQName) {
-        return new RestrictedBooleanType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return BooleanTypeDefinition.hashCode(this);
index dfda55aed17c984072dea43c07a05a9cff8c6faf..b2c3aebcac98663c62b10ed91d0d97c2acd3f92c 100644 (file)
@@ -23,15 +23,6 @@ final class RestrictedDecimalType extends AbstractRangeRestrictedType<DecimalTyp
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedDecimalType(final RestrictedDecimalType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedDecimalType bindTo(final QName newQName) {
-        return new RestrictedDecimalType(this, newQName);
-    }
-
     @Override
     public int getFractionDigits() {
         return getBaseType().getFractionDigits();
index 8b723bc6ff8cab9f88cd9c9640e3cb43017a4b4c..0246d228680923bb2a8936534da90e682e6e165c 100644 (file)
@@ -18,15 +18,6 @@ final class RestrictedEmptyType extends AbstractRestrictedType<EmptyTypeDefiniti
         super(baseType, qname, unknownSchemaNodes);
     }
 
-    private RestrictedEmptyType(final RestrictedEmptyType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedEmptyType bindTo(final QName newQName) {
-        return new RestrictedEmptyType(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return EmptyTypeDefinition.hashCode(this);
index 4965ba5cdced932282e2cac9e2093b894569fc57..049e43e1246eb45b6767bf63b0a6dd2345b6bde3 100644 (file)
@@ -24,16 +24,6 @@ final class RestrictedEnumerationType extends AbstractRestrictedType<EnumTypeDef
         this.values = ImmutableList.copyOf(values);
     }
 
-    private RestrictedEnumerationType(final RestrictedEnumerationType original, final QName qname) {
-        super(original, qname);
-        this.values = original.values;
-    }
-
-    @Override
-    RestrictedEnumerationType bindTo(final QName newQName) {
-        return new RestrictedEnumerationType(this, newQName);
-    }
-
     @Override
     public List<EnumPair> getValues() {
         return values;
index 312a7d39065b66ef1794c8c10b54d33c38795b79..ca7f0f2bf0c72c31c06475240814dd4795fa701e 100644 (file)
@@ -21,15 +21,6 @@ final class RestrictedIdentityrefType extends AbstractRestrictedType<Identityref
         super(baseType, qname, unknownSchemaNodes);
     }
 
-    private RestrictedIdentityrefType(final RestrictedIdentityrefType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedIdentityrefType bindTo(final QName newQName) {
-        return new RestrictedIdentityrefType(this, newQName);
-    }
-
     @Override
     public Set<? extends IdentitySchemaNode> getIdentities() {
         return getBaseType().getIdentities();
index 925467a1540881fb3843c29501981f350d475691..c3114c4dfff13c245f9428ca0f926855cf39560c 100644 (file)
@@ -22,16 +22,6 @@ final class RestrictedInstanceIdentifierType extends AbstractRestrictedType<Inst
         this.requireInstance = requireInstance;
     }
 
-    private RestrictedInstanceIdentifierType(final RestrictedInstanceIdentifierType original, final QName qname) {
-        super(original, qname);
-        this.requireInstance = original.requireInstance;
-    }
-
-    @Override
-    RestrictedInstanceIdentifierType bindTo(final QName newQName) {
-        return new RestrictedInstanceIdentifierType(this, newQName);
-    }
-
     @Override
     public boolean requireInstance() {
         return requireInstance;
index e824d04b6ba3eae3860a78526ef805780674805b..004ea0eab6b6a6d2aa2db8305a17b9a025ab18eb 100644 (file)
@@ -22,15 +22,6 @@ final class RestrictedInt16Type extends AbstractRangeRestrictedType<Int16TypeDef
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedInt16Type(final RestrictedInt16Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedInt16Type bindTo(final QName newQName) {
-        return new RestrictedInt16Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int16TypeDefinition.hashCode(this);
index 50fb2f010012890f0f36a660e08cbf3821a2a6a2..0dbeeb1edd846f7685c75ed4bd63dfb2ef18027f 100644 (file)
@@ -22,15 +22,6 @@ final class RestrictedInt32Type extends AbstractRangeRestrictedType<Int32TypeDef
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedInt32Type(final RestrictedInt32Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedInt32Type bindTo(final QName newQName) {
-        return new RestrictedInt32Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int32TypeDefinition.hashCode(this);
index aa522e1ed6fa2acf012107888557fc3133fadd38..7a8f8503b258f304db8b1faccb6c065055e39420 100644 (file)
@@ -22,15 +22,6 @@ final class RestrictedInt64Type extends AbstractRangeRestrictedType<Int64TypeDef
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedInt64Type(final RestrictedInt64Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedInt64Type bindTo(final QName newQName) {
-        return new RestrictedInt64Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int64TypeDefinition.hashCode(this);
index 08de814a2a358d9268e2aedd1ca7437539e875cf..3e51c34ca884425b5bda88aba37d9e197fb11c98 100644 (file)
@@ -22,15 +22,6 @@ final class RestrictedInt8Type extends AbstractRangeRestrictedType<Int8TypeDefin
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedInt8Type(final RestrictedInt8Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedInt8Type bindTo(final QName newQName) {
-        return new RestrictedInt8Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Int8TypeDefinition.hashCode(this);
index bff28a8c68c797571167c8282095e95cb39aa2da..ccec73728a71abfd12fbe71e568ce97c4c39a29d 100644 (file)
@@ -23,16 +23,6 @@ final class RestrictedLeafrefType extends AbstractRestrictedType<LeafrefTypeDefi
         this.requireInstance = requireInstance;
     }
 
-    private RestrictedLeafrefType(final RestrictedLeafrefType original, final QName qname) {
-        super(original, qname);
-        this.requireInstance = original.requireInstance;
-    }
-
-    @Override
-    RestrictedLeafrefType bindTo(final QName newQName) {
-        return new RestrictedLeafrefType(this, newQName);
-    }
-
     @Override
     public PathExpression getPathStatement() {
         return getBaseType().getPathStatement();
index ed305627ef18d605590365822fbe651e02c61423..c4b76b20b21ad5d61a06a9722550483ad1273e47 100644 (file)
@@ -30,16 +30,6 @@ final class RestrictedStringType extends AbstractLengthRestrictedType<StringType
         this.patternConstraints = ImmutableList.copyOf(patternConstraints);
     }
 
-    private RestrictedStringType(final RestrictedStringType original, final QName qname) {
-        super(original, qname);
-        this.patternConstraints = original.patternConstraints;
-    }
-
-    @Override
-    RestrictedStringType bindTo(final QName newQName) {
-        return new RestrictedStringType(this, newQName);
-    }
-
     @Override
     public List<PatternConstraint> getPatternConstraints() {
         return patternConstraints;
index 8ec151997eb09c3fd7686da32073f52a93a53dbb..3b4dbad49bc14e9c1ec15fc59e3ba2d768efd742 100644 (file)
@@ -23,15 +23,6 @@ final class RestrictedUint16Type extends AbstractRangeRestrictedType<Uint16TypeD
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedUint16Type(final RestrictedUint16Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedUint16Type bindTo(final QName newQName) {
-        return new RestrictedUint16Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint16TypeDefinition.hashCode(this);
index 4f3b753819d24a42d7792d982dc18f946c6018cb..365f761c5539b1f19381362c029c8db1abc48933 100644 (file)
@@ -23,15 +23,6 @@ final class RestrictedUint32Type extends AbstractRangeRestrictedType<Uint32TypeD
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedUint32Type(final RestrictedUint32Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedUint32Type bindTo(final QName newQName) {
-        return new RestrictedUint32Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint32TypeDefinition.hashCode(this);
index 9bf031293d7ff1ebe575b760f8572bda23fc5f3c..9d2729eceeff67229317dff950854cbfd2ce0406 100644 (file)
@@ -23,15 +23,6 @@ final class RestrictedUint64Type extends AbstractRangeRestrictedType<Uint64TypeD
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedUint64Type(final RestrictedUint64Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedUint64Type bindTo(final QName newQName) {
-        return new RestrictedUint64Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint64TypeDefinition.hashCode(this);
index 07c763180f8478fdf1dace97f05b34242499a4ee..ef4021c2e632df4391f9d3f5ec32dd5265c6730d 100644 (file)
@@ -23,15 +23,6 @@ final class RestrictedUint8Type extends AbstractRangeRestrictedType<Uint8TypeDef
         super(baseType, qname, unknownSchemaNodes, rangeConstraint);
     }
 
-    private RestrictedUint8Type(final RestrictedUint8Type original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedUint8Type bindTo(final QName newQName) {
-        return new RestrictedUint8Type(this, newQName);
-    }
-
     @Override
     public int hashCode() {
         return Uint8TypeDefinition.hashCode(this);
index f61c4aeddcca358cc1eb78f10abf1562f8b63bc3..357ec56df3882d10fb48e90af9c69c18178d4f11 100644 (file)
@@ -20,15 +20,6 @@ final class RestrictedUnionType extends AbstractRestrictedType<UnionTypeDefiniti
         super(baseType, qname, unknownSchemaNodes);
     }
 
-    private RestrictedUnionType(final RestrictedUnionType original, final QName qname) {
-        super(original, qname);
-    }
-
-    @Override
-    RestrictedUnionType bindTo(final QName newQName) {
-        return new RestrictedUnionType(this, newQName);
-    }
-
     @Override
     public List<TypeDefinition<?>> getTypes() {
         return getBaseType().getTypes();
index b05f7cb7fef0f6b1252580dee10f2e731c203fb9..463ee1acd9e6d5d7cb0d875791f117daec660a45 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.model.spi.type;
 
-import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
@@ -28,24 +27,6 @@ public abstract class TypeBuilder<T extends TypeDefinition<T>> implements Builde
         this.baseType = baseType;
     }
 
-    /**
-     * Create a copy of specified {@link TypeDefinition} with specified {@link QName}.
-     *
-     * @param <T> Type definition type
-     * @param type Original type definition
-     * @param qname QName for the copy
-     * @return A copy of type definition
-     * @throws NullPointerException if any argument is null
-     * @throws IllegalArgumentException if {@code type} is not a recognised implementation
-     */
-    public static <T extends TypeDefinition<?>> @NonNull T copyTypeDefinition(final T type, final QName qname) {
-        if (qname.equals(type.getQName())) {
-            return type;
-        }
-        checkArgument(type instanceof AbstractTypeDefinition, "Unsupported type %s", type);
-        return (T) ((AbstractTypeDefinition<?>) type).bindTo(requireNonNull(qname));
-    }
-
     final T getBaseType() {
         return baseType;
     }
index f9e4b611a7756ec78cb7b92bbd2a0e4f48cf1f37..968f58247226ee829d13c2d4bd62ae9f619cc161 100644 (file)
@@ -60,7 +60,7 @@ abstract class AbstractLeafListEffectiveStatement
         this.path = requireNonNull(path);
         this.substatements = original.substatements;
         this.flags = flags;
-        // FIXME: share with original?
+        // TODO: lazy instantiation?
         this.type = buildType();
     }