import com.google.common.collect.ImmutableCollection;
import java.util.List;
import java.util.Optional;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.yangtools.yang.binding.BindingStreamEventWriter;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
*
* @return interface which defines API of binding representation of data.
*/
- @Nonnull
- Class<T> getBindingClass();
+ @NonNull Class<T> getBindingClass();
/**
* Returns child context as if it was walked by {@link BindingStreamEventWriter}. This means that to enter case,
* @throws IllegalArgumentException
* If supplied child class is not valid in specified context.
*/
- @Nonnull
- <E extends DataObject> BindingCodecTreeNode<E> streamChild(@Nonnull Class<E> childClass);
+ // FIXME: this may return null in some implementations...
+ <E extends DataObject> @NonNull BindingCodecTreeNode<E> streamChild(@NonNull Class<E> childClass);
/**
* Returns child context as if it was walked by {@link BindingStreamEventWriter}. This means that to enter case,
* applicable in context.
*/
<E extends DataObject> Optional<? extends BindingCodecTreeNode<E>> possibleStreamChild(
- @Nonnull Class<E> childClass);
+ @NonNull Class<E> childClass);
/**
* Returns nested node context using supplied YANG Instance Identifier.
* @throws IllegalArgumentException
* If supplied argument does not represent valid child.
*/
- @Nonnull
- BindingCodecTreeNode<?> yangPathArgumentChild(@Nonnull YangInstanceIdentifier.PathArgument child);
+ @NonNull BindingCodecTreeNode<?> yangPathArgumentChild(YangInstanceIdentifier.@NonNull PathArgument child);
/**
* Returns nested node context using supplied Binding Instance Identifier and adds YANG instance identifiers to
* @throws IllegalArgumentException
* If supplied argument does not represent valid child.
*/
- @Nonnull
- BindingCodecTreeNode<?> bindingPathArgumentChild(@Nonnull InstanceIdentifier.PathArgument arg,
+ @NonNull BindingCodecTreeNode<?> bindingPathArgumentChild(InstanceIdentifier.@NonNull PathArgument arg,
@Nullable List<YangInstanceIdentifier.PathArgument> builder);
/**
* @param cacheSpecifier Set of objects, for which cache may be in place
* @return Codec whihc uses cache for serialization / deserialization.
*/
- @Nonnull
- BindingNormalizedNodeCachingCodec<T> createCachingCodec(@Nonnull
- ImmutableCollection<Class<? extends DataObject>> cacheSpecifier);
+ @NonNull BindingNormalizedNodeCachingCodec<T> createCachingCodec(
+ @NonNull ImmutableCollection<Class<? extends DataObject>> cacheSpecifier);
@Beta
void writeAsNormalizedNode(T data, NormalizedNodeStreamWriter writer);
* @throws IllegalArgumentException If supplied {@code arg} is not valid.
*/
@Beta
- @Nullable YangInstanceIdentifier.PathArgument serializePathArgument(@Nullable InstanceIdentifier.PathArgument arg);
+ YangInstanceIdentifier.@Nullable PathArgument serializePathArgument(InstanceIdentifier.@Nullable PathArgument arg);
/**
* Deserializes path argument for current node.
* @throws IllegalArgumentException If supplied {@code arg} is not valid.
*/
@Beta
- @Nullable InstanceIdentifier.PathArgument deserializePathArgument(
- @Nullable YangInstanceIdentifier.PathArgument arg);
+ InstanceIdentifier.@Nullable PathArgument deserializePathArgument(
+ YangInstanceIdentifier.@Nullable PathArgument arg);
/**
* Return the schema node associated with this node.
*
* @return A schema node.
*/
- @Nonnull WithStatus getSchema();
+ @NonNull WithStatus getSchema();
/**
* Return a summary of addressability of potential children. Binding specification does not allow all DOM tree
*
* @return Summary children addressability.
*/
- @Nonnull ChildAddressabilitySummary getChildAddressabilitySummary();
+ @NonNull ChildAddressabilitySummary getChildAddressabilitySummary();
/**
* Enumeration of possible addressability attribute of all children.