+
+ try {
+ runtimeContext.loadClass(Type.of(childClass));
+ } catch (final ClassNotFoundException e) {
+ throw new MissingClassInLoadingStrategyException(
+ "User supplied class " + childClass.getName() + " is not available in " + runtimeContext, e);
+ }
+
+ throw IncorrectNestingException.create(message, args);
+ }
+
+ private static QName extractName(final YangInstanceIdentifier.PathArgument child) {
+ if (child instanceof AugmentationIdentifier) {
+ final Set<QName> children = ((AugmentationIdentifier) child).getPossibleChildNames();
+ checkArgument(!children.isEmpty(), "Augmentation without childs must not be used in data");
+ return children.iterator().next();
+ }
+ return child.getNodeType();
+ }
+
+ final DataObjectSerializer eventStreamSerializer() {
+ final DataObjectSerializer existing = (DataObjectSerializer) EVENT_STREAM_SERIALIZER.getAcquire(this);
+ return existing != null ? existing : loadEventStreamSerializer();
+ }
+
+ // Split out to aid inlining
+ private DataObjectSerializer loadEventStreamSerializer() {
+ final DataObjectSerializer loaded = factory().getEventStreamSerializer(getBindingClass());
+ final Object witness = EVENT_STREAM_SERIALIZER.compareAndExchangeRelease(this, null, loaded);
+ return witness == null ? loaded : (DataObjectSerializer) witness;