BUG-865: mark yang-model-util types as deprecated
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / BooleanType.java
index b4740884fb24743a4c3b3b5f6522da9d81a580de..3783da14f9e9b43251b75354f971374cc51b9a79 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.model.util;
 
 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;
@@ -20,11 +19,12 @@ import org.opendaylight.yangtools.yang.model.api.type.BooleanTypeDefinition;
  * 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 QName NAME = BaseTypes.constructQName("boolean");
-    private static final SchemaPath PATH = new SchemaPath(Collections.singletonList(NAME), true);
+    private static final SchemaPath PATH = SchemaPath.create(true, BaseTypes.BOOLEAN_QNAME);
     private static final String DESCRIPTION = "The boolean built-in type represents a boolean value.";
     private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.5";
     private static final String UNITS = "";
@@ -35,6 +35,10 @@ public final class BooleanType implements BooleanTypeDefinition {
     private BooleanType() {
     }
 
+    /**
+     * Returns default instance of boolean built-in type.
+     * @return default instance of boolean built-in type.
+     */
     public static BooleanType getInstance() {
         return INSTANCE;
     }
@@ -79,7 +83,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public QName getQName() {
-        return NAME;
+        return BaseTypes.BOOLEAN_QNAME;
     }
 
     /*
@@ -132,7 +136,7 @@ public final class BooleanType implements BooleanTypeDefinition {
     public String toString() {
         StringBuilder builder = new StringBuilder();
         builder.append("BooleanType [name=");
-        builder.append(NAME);
+        builder.append(BaseTypes.BOOLEAN_QNAME);
         builder.append(", path=");
         builder.append(PATH);
         builder.append("]");