+ private OpenType<?> getCompositeType(Type baseType, TypeDefinition<?> baseTypeDefinition) {
+
+ SimpleType<?> innerItemType = SimpleTypeResolver.getSimpleType(baseType);
+ String innerItemName = typeProviderWrapper.getJMXParamForBaseType(baseTypeDefinition);
+
+ String[] itemNames = new String[]{innerItemName};
+ String description = getNullableDescription() == null ? getAttributeYangName() : getNullableDescription();
+
+ OpenType<?>[] itemTypes = new OpenType[]{innerItemType};
+ try {
+ return new CompositeType(getUpperCaseCammelCase(), description, itemNames, itemNames, itemTypes);
+ } catch (OpenDataException e) {
+ throw new RuntimeException("Unable to create " + CompositeType.class + " with inner element of type "
+ + itemTypes, e);
+ }
+
+ }
+
+ private OpenType<?> getArrayType() {
+ String innerTypeFullyQName = getInnerType(getType());
+ SimpleType<?> innerSimpleType = SimpleTypeResolver.getSimpleType(innerTypeFullyQName);
+ try {
+ ArrayType<Object> arrayType = isPrimitive(innerTypeFullyQName) ? new ArrayType<>(innerSimpleType, true)
+ : new ArrayType<>(1, innerSimpleType);
+ return arrayType;
+ } catch (OpenDataException e) {
+ throw new RuntimeException("Unable to create " + ArrayType.class + " with inner element of type "
+ + innerSimpleType, e);
+ }
+ }
+