Having these classes out in the open creates confusion in users.
Deprecate them in favor of util.type.{Base,Derived,Restricted}Types(),
which do not leak implementation details.
Change-Id: Ib690a43d7e956e5ed0cac13a6276cb03fd049843
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
* @return Returns default instance or {@link Optional#absent()} if default
* instance does not exists
*
+ * @deprecated Use parser-specific lookup tables.
*/
+ @Deprecated
public static Optional<TypeDefinition<?>> defaultBaseTypeFor(final String typeName) {
return Optional.<TypeDefinition<?>> fromNullable(defaultBaseTypeForImpl(typeName));
}
+ @Deprecated
private static TypeDefinition<?> defaultBaseTypeForImpl(final String typeName) {
Preconditions.checkNotNull(typeName, "typeName must not be null.");
* The <code>default</code> implementation of Binary Type Definition interface.
*
* @see BinaryTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#binaryType()} instead
*/
+@Deprecated
public final class BinaryType implements BinaryTypeDefinition {
private static final String DESCRIPTION = "The binary built-in type represents any binary data, i.e., a sequence of octets.";
private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.8";
* The <code>default</code> implementation of Bits Type Definition interface.
*
* @see BitsTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#bitsTypeBuilder(SchemaPath)} instead
*/
+@Deprecated
public final class BitsType implements BitsTypeDefinition {
private static final QName NAME = BaseTypes.BITS_QNAME;
private static final String DESCRIPTION = "The bits built-in type represents a bit set. "
import java.util.Collections;
import java.util.List;
-
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.Status;
* The <code>default</code> implementation of Boolean Type Definition interface.
*
* @see BooleanTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#booleanType()} instead
*/
+@Deprecated
public final class BooleanType implements BooleanTypeDefinition {
private static final BooleanType INSTANCE = new BooleanType();
private static final SchemaPath PATH = SchemaPath.create(true, BaseTypes.BOOLEAN_QNAME);
* The <code>default</code> implementation of Decimal Type Definition interface.
*
* @see DecimalTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#decimalTypeBuilder(SchemaPath)} instead
*/
+@Deprecated
public final class Decimal64 implements DecimalTypeDefinition {
private static final String DESCRIPTION = "The decimal64 type represents a subset of the real numbers, which can "
+ "be represented by decimal numerals. The value space of decimal64 is the set of numbers that can "
* preserving original implemented interface instead of {@link ExtendedType}
* which does not preserve final type of data.
*
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.DerivedTypes} or
+ * {@link org.opendaylight.yangtools.yang.model.util.type.RestrictedTypes} instead
*/
+@Deprecated
public abstract class DerivedType<T extends TypeDefinition<T>> implements TypeDefinition<T> {
private final ExtendedType definition;
this.publicType = Preconditions.checkNotNull(publicType);
}
- public static TypeDefinition<?> from(TypeDefinition<?> type) {
+ public static TypeDefinition<?> from(final TypeDefinition<?> type) {
if(type instanceof ExtendedType) {
return from((ExtendedType) type);
}
import java.util.Collections;
import java.util.List;
-
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.EmptyTypeDefinition;
+/**
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#emptyType()} instead
+ */
+@Deprecated
public final class EmptyType implements EmptyTypeDefinition, Immutable {
private static final EmptyType INSTANCE = new EmptyType();
private static final QName NAME = BaseTypes.EMPTY_QNAME;
* interface.
*
* @see EnumTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#enumerationTypeBuilder(SchemaPath)} instead
*/
+@Deprecated
public final class EnumerationType implements EnumTypeDefinition {
private static final String DESCRIPTION = "The enumeration built-in type represents values from a set of assigned names.";
private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.6";
* interface.
*
* @see IdentityrefTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#identityrefTypeBuilder(SchemaPath)} instead
*/
+@Deprecated
public final class IdentityrefType implements IdentityrefTypeDefinition {
private static final QName NAME = BaseTypes.IDENTITYREF_QNAME;
private static final String DESCRIPTION = "The identityref type is used to reference an existing identity.";
* returns false.
*
* @see InstanceIdentifierTypeDefinition
- *
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#instanceIdentifierType()} instead
*/
+@Deprecated
public final class InstanceIdentifierType implements InstanceIdentifierTypeDefinition, Immutable {
private static final QName NAME = BaseTypes.INSTANCE_IDENTIFIER_QNAME;
* Java counterpart of Yang int16 built-in type is {@link Short}.
*
* @see AbstractSignedInteger
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#int16Type()} instead
*/
+@Deprecated
public final class Int16 extends AbstractSignedInteger implements Immutable {
private static final String DESCRIPTION = "int16 represents integer values between -32768 and 32767, inclusively.";
* {@link Integer}.
*
* @see AbstractSignedInteger
- *
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#int32Type()} instead
*/
+@Deprecated
public final class Int32 extends AbstractSignedInteger implements Immutable {
private static final String DESCRIPTION = "int32 represents integer values between -2147483648 and 2147483647, inclusively.";
* 9223372036854775807, inclusively. The Java counterpart of Yang int64 built-in
* type is {@link Long}.
*
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#int64Type()} instead
*/
+@Deprecated
public final class Int64 extends AbstractSignedInteger implements Immutable {
private static final String DESCRIPTION = "int64 represents integer values between -9223372036854775808 and 9223372036854775807, inclusively.";
* counterpart of Yang int8 built-in type is {@link Byte}.
*
* @see AbstractSignedInteger
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#int8Type()} instead
*/
+@Deprecated
public final class Int8 extends AbstractSignedInteger implements Immutable {
private static final String DESCRIPTION = "represents integer values between -128 and 127, inclusively.";
* interface.
*
* @see LeafrefTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#leafrefTypeBuilder(SchemaPath)} instead
*/
+@Deprecated
public final class Leafref implements LeafrefTypeDefinition {
private static final QName NAME = BaseTypes.constructQName("leafref");
private static final SchemaPath PATH = SchemaPath.create(true, NAME);
* The <code>default</code> implementation of String Type Definition interface.
*
* @see StringTypeDefinition
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#stringType()} instead
*/
+@Deprecated
public final class StringType implements StringTypeDefinition, Immutable {
private static final QName NAME = BaseTypes.STRING_QNAME;
private static final SchemaPath PATH = SchemaPath.create(true, NAME);
* uint16 represents integer values between 0 and 65535, inclusively. The Java
* counterpart of Yang uint16 built-in type is {@link Integer}.
*
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint16Type()} instead
*/
+@Deprecated
public final class Uint16 extends AbstractUnsignedInteger implements Immutable {
public static final int MAX_VALUE = 65535;
private static final String DESCRIPTION = "uint16 represents integer values between 0 and 65535, inclusively.";
* Implementation of Yang uint32 built-in type. <br>
* uint32 represents integer values between 0 and 4294967295, inclusively.
*
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint32Type()} instead
*/
+@Deprecated
public final class Uint32 extends AbstractUnsignedInteger implements Immutable {
public static final long MAX_VALUE = 4294967295L;
private static final String DESCRIPTION = "uint32 represents integer values between 0 and 4294967295, inclusively.";
package org.opendaylight.yangtools.yang.model.util;
import java.math.BigInteger;
-
import org.opendaylight.yangtools.concepts.Immutable;
/**
* inclusively. The Java counterpart of Yang uint64 built-in type is
* {@link BigInteger}.
*
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint64Type()} instead
*/
+@Deprecated
public final class Uint64 extends AbstractUnsignedInteger implements Immutable {
public static final BigInteger MAX_VALUE = new BigInteger("18446744073709551615");
private static final String DESCRIPTION = "uint64 represents integer values between 0 and 18446744073709551615, inclusively.";
* uint8 represents integer values between 0 and 255, inclusively.
*
* @see AbstractUnsignedInteger
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#uint8Type()} instead
*/
+@Deprecated
public final class Uint8 extends AbstractUnsignedInteger implements Immutable {
public static final int MAX_VALUE = 255;
private static final String DESCRIPTION = "uint8 represents integer values between 0 and 255, inclusively.";
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
+/**
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.util.type.BaseTypes#unionTypeBuilder(SchemaPath)} instead
+ */
+@Deprecated
public final class UnionType implements UnionTypeDefinition {
private static final SchemaPath PATH = SchemaPath.create(true, BaseTypes.UNION_QNAME);
private static final String DESCRIPTION = "The union built-in type represents a value that corresponds to one of its member types.";