import org.opendaylight.mdsal.binding.dom.codec.api.MissingClassInLoadingStrategyException;
import org.opendaylight.mdsal.binding.dom.codec.api.MissingSchemaException;
import org.opendaylight.mdsal.binding.dom.codec.api.MissingSchemaForClassException;
-import org.opendaylight.mdsal.binding.model.api.DefaultType;
+import org.opendaylight.mdsal.binding.model.api.Type;
import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.BindingObject;
}
try {
- runtimeContext.loadClass(DefaultType.of(childClass));
+ runtimeContext.loadClass(Type.of(childClass));
} catch (final ClassNotFoundException e) {
throw new MissingClassInLoadingStrategyException(
"User supplied class " + childClass.getName() + " is not available in " + runtimeContext, e);
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.mdsal.binding.dom.codec.api.IncorrectNestingException;
-import org.opendaylight.mdsal.binding.model.api.DefaultType;
import org.opendaylight.mdsal.binding.model.api.Type;
import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
final BindingRuntimeContext ctx = factory().getRuntimeContext();
final Class<?> loaded;
try {
- loaded = ctx.loadClass(DefaultType.of(cls));
+ loaded = ctx.loadClass(Type.of(cls));
} catch (ClassNotFoundException e) {
LOG.debug("Proposed {} cannot be loaded in {}", cls, ctx, e);
return false;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.opendaylight.mdsal.binding.model.api.AnnotationType;
import org.opendaylight.mdsal.binding.model.api.ConcreteType;
-import org.opendaylight.mdsal.binding.model.api.DefaultType;
import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
import org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject;
import org.opendaylight.mdsal.binding.model.api.GeneratedType;
throw new ExceptionInInitializerError(e);
}
- AUGMENTATION_RET_TYPE = DefaultType.of(JavaTypeName.create(m.getReturnType()));
+ AUGMENTATION_RET_TYPE = Type.of(JavaTypeName.create(m.getReturnType()));
}
private final AbstractJavaGeneratedType javaType;
augmentType = t;
}
} else if (Augmentable.class.getName().equals(implementedIfc.getFullyQualifiedName())) {
- augmentType = Types.parameterizedTypeFor(AUGMENTATION_RET_TYPE, DefaultType.of(type.getIdentifier()));
+ augmentType = Types.parameterizedTypeFor(AUGMENTATION_RET_TYPE, Type.of(type.getIdentifier()));
}
}
import java.util.Set;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import org.opendaylight.mdsal.binding.model.api.DefaultType;
import org.opendaylight.mdsal.binding.model.api.GeneratedType;
import org.opendaylight.mdsal.binding.model.api.MethodSignature;
import org.opendaylight.mdsal.binding.model.api.ParameterizedType;
@Override
public final <T extends Augmentation<?>> AugmentationSchemaNode getAugmentationDefinition(final Class<T> augClass) {
- return getTypes().findAugmentation(DefaultType.of(augClass)).orElse(null);
+ return getTypes().findAugmentation(Type.of(augClass)).orElse(null);
}
@Override
checkArgument(!Augmentation.class.isAssignableFrom(cls), "Supplied class must not be an augmentation (%s is)",
cls);
checkArgument(!Action.class.isAssignableFrom(cls), "Supplied class must not be an action (%s is)", cls);
- return (DataSchemaNode) getTypes().findSchema(DefaultType.of(cls)).orElse(null);
+ return (DataSchemaNode) getTypes().findSchema(Type.of(cls)).orElse(null);
}
@Override
public final ActionDefinition getActionDefinition(final Class<? extends Action<?, ?, ?>> cls) {
- return (ActionDefinition) getTypes().findSchema(DefaultType.of(cls)).orElse(null);
+ return (ActionDefinition) getTypes().findSchema(Type.of(cls)).orElse(null);
}
@Override
public final Absolute getActionIdentifier(final Class<? extends Action<?, ?, ?>> cls) {
- return getTypes().findSchemaNodeIdentifier(DefaultType.of(cls)).orElse(null);
+ return getTypes().findSchemaNodeIdentifier(Type.of(cls)).orElse(null);
}
@Override
@Override
public final Entry<GeneratedType, WithStatus> getTypeWithSchema(final Class<?> type) {
- return getTypeWithSchema(getTypes(), DefaultType.of(type));
+ return getTypeWithSchema(getTypes(), Type.of(type));
}
private static @NonNull Entry<GeneratedType, WithStatus> getTypeWithSchema(final BindingRuntimeTypes types,
@Override
public final Set<Class<?>> getCases(final Class<?> choice) {
- final Collection<Type> cazes = getTypes().findCases(DefaultType.of(choice));
+ final Collection<Type> cazes = getTypes().findCases(Type.of(choice));
final Set<Class<?>> ret = new HashSet<>(cazes.size());
for (final Type caze : cazes) {
try {