import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
+import java.io.ObjectStreamException;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
* </ul>
*
*
- * @see http://tools.ietf.org/html/rfc6020#section-9.13
+ * @see <a href="http://tools.ietf.org/html/rfc6020#section-9.13">RFC6020</a>
*/
public final class YangInstanceIdentifier implements Path<YangInstanceIdentifier>, Immutable, Serializable {
@SuppressWarnings("rawtypes")
hash.addArgument(a);
}
- return new YangInstanceIdentifier(path, hash.toInstance());
+ return new YangInstanceIdentifier(path, hash.build());
}
public static final YangInstanceIdentifier create(final Iterable<? extends PathArgument> path) {
return new BuilderImpl(origin.getPathArguments(), origin.hashCode());
}
- /**
- * Returns new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
- *
- * @param node QName of first {@link NodeIdentifier} path argument.
- * @return new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
- *
- * @deprecated Either use {@link #node(QName)} or instantiate an intermediate builder.
- */
- @Deprecated
- public static InstanceIdentifierBuilder builder(final QName node) {
- return builder().node(node);
- }
-
/**
* Path argument / component of InstanceIdentifier
*
}
/**
- *
* Fluent Builder of Instance Identifier instances
- *
- * @
- *
*/
public interface InstanceIdentifierBuilder extends Builder<YangInstanceIdentifier> {
/**
*
* @return {@link YangInstanceIdentifier}
*/
+ @Override
YangInstanceIdentifier build();
+
+ /*
+ * @deprecated use #build()
+ */
+ @Deprecated
+ YangInstanceIdentifier toInstance();
}
/**
* / module to the target node.
*
*
- * @see http://tools.ietf.org/html/rfc6020#section-7.15
+ * @see <a href="http://tools.ietf.org/html/rfc6020#section-7.15">RFC6020</a>
*/
public static final class AugmentationIdentifier implements PathArgument {
private static final long serialVersionUID = -8122335594681936939L;
this.childNames = ImmutableSet.copyOf(childNames);
}
- /**
- * Augmentation node has no QName
- *
- * @deprecated Use
- * {@link AugmentationIdentifier#AugmentationIdentifier(Set)}
- * instead.
- */
- @Deprecated
- public AugmentationIdentifier(final QName nodeType, final Set<QName> childNames) {
- this(childNames);
- }
-
/**
* Returns set of all possible child nodes
*
@Override
public YangInstanceIdentifier build() {
- return new YangInstanceIdentifier(ImmutableList.copyOf(path), hash.toInstance());
+ return new YangInstanceIdentifier(ImmutableList.copyOf(path), hash.build());
}
}
}
}
+ private Object readResolve() throws ObjectStreamException {
+ return legacyPath.isEmpty() ? EMPTY : this;
+ }
+
private void writeObject(final ObjectOutputStream outputStream) throws IOException {
/*
* This may look strange, but what we are doing here is side-stepping the fact