Object readResolve() throws ObjectStreamException { return new InstanceIdentifier<>(targetType, pathArguments, wildcarded, hash); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) static InstanceIdentifier<?> trustedCreate(final PathArgument arg, final Iterable<PathArgument> pathArguments, final int hash, boolean wildcarded) { if (Identifiable.class.isAssignableFrom(arg.getType()) && !(wildcarded)) { Identifier<?> key = null; if (arg instanceof IdentifiableItem<?, ?>) { key = ((IdentifiableItem<?, ?>)arg).key; } else { wildcarded = true; } return new KeyedInstanceIdentifier(arg.getType(), pathArguments, wildcarded, hash, key); } else { return new InstanceIdentifier(arg.getType(), pathArguments, wildcarded, hash); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) static <N extends DataObject> InstanceIdentifier<N> trustedCreate(final PathArgument arg, final Iterable<PathArgument> pathArguments, final int hash, boolean wildcarded) { if (Identifiable.class.isAssignableFrom(arg.getType()) && !wildcarded) { Identifier<?> key = null; if (arg instanceof IdentifiableItem) { key = ((IdentifiableItem<?, ?>)arg).getKey(); } else { wildcarded = true; } return new KeyedInstanceIdentifier(arg.getType(), pathArguments, wildcarded, hash, key); } return new InstanceIdentifier(arg.getType(), pathArguments, wildcarded, hash); }