Deprecate (Checked)Builder for removal
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / Builder.java
index 0484c4831e86b81bcf7ebf408049dcdcc135d3e3..feec797b0711aa40a8d173e8ae9c858ad84f19f8 100644 (file)
@@ -9,20 +9,14 @@ package org.opendaylight.yangtools.concepts;
 
 /**
  * Builder object which produces a product.
- * 
+ *
  * @param <P> Product of builder
- * 
  * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
+ * @deprecated This is an over-arching concept whose {@link #build()} method hides caller hierarchy. Users are advised
+ *             to migrate away, either without a replacement interface, or with a proper domain-specific interface.
  */
-public interface Builder<P> extends Mutable {
-    
-    /**
-     * Returns instance of the product.
-     * 
-     * Multiple calls to this method are not required to return
-     * same instance if the state of the builder was changed.
-     * 
-     * @return Newly-built instance
-     */
-    P toInstance();
+@Deprecated(since = "8.0.0", forRemoval = true)
+public interface Builder<P> extends CheckedBuilder<P, IllegalArgumentException> {
+    @Override
+    P build();
 }