import org.opendaylight.mdsal.binding.runtime.api.AugmentRuntimeType;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.DataObjectStep;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
private final MethodHandle proxyConstructor;
- private AugmentationCodecContext(final AugmentationCodecPrototype prototype,
+ private AugmentationCodecContext(final AugmentationCodecPrototype<D> prototype,
final DataContainerAnalysis<AugmentRuntimeType> analysis) {
super(prototype, analysis);
proxyConstructor = ctor.asType(DATAOBJECT_TYPE);
}
- AugmentationCodecContext(final AugmentationCodecPrototype prototype) {
+ AugmentationCodecContext(final AugmentationCodecPrototype<D> prototype) {
this(prototype, new DataContainerAnalysis<>(prototype, CodecItemFactory.of()));
}
@Override
- public PathArgument serializePathArgument(final InstanceIdentifier.PathArgument arg) {
- if (!bindingArg().equals(arg)) {
- throw new IllegalArgumentException("Unexpected argument " + arg);
+ public PathArgument serializePathArgument(final DataObjectStep<?> step) {
+ if (!bindingArg().equals(step)) {
+ throw new IllegalArgumentException("Unexpected argument " + step);
}
return null;
}
@Override
- public InstanceIdentifier.PathArgument deserializePathArgument(final PathArgument arg) {
+ public DataObjectStep<?> deserializePathArgument(final PathArgument arg) {
if (arg != null) {
throw new IllegalArgumentException("Unexpected argument " + arg);
}
@SuppressWarnings("checkstyle:illegalCatch")
@Override
public D filterFrom(final DataContainerNode parentData) {
- for (var childArg : ((AugmentationCodecPrototype) prototype()).getChildArgs()) {
+ for (var childArg : ((AugmentationCodecPrototype<?>) prototype()).getChildArgs()) {
if (parentData.childByArg(childArg) != null) {
try {
return (D) proxyConstructor.invokeExact(this, parentData);
}
@Override
- protected Object deserializeObject(final NormalizedNode normalizedNode) {
+ Object deserializeObject(final NormalizedNode normalizedNode) {
return filterFrom(checkDataArgument(DataContainerNode.class, normalizedNode));
}
@Override
- void addYangPathArgument(final List<PathArgument> builder, final InstanceIdentifier.PathArgument arg) {
+ void addYangPathArgument(final List<PathArgument> builder, final DataObjectStep<?> step) {
// No-op
}
@Override
- protected NodeIdentifier getDomPathArgument() {
+ NodeIdentifier getDomPathArgument() {
return null;
}