类javax.management.openmbean.ArrayType源码实例Demo

下面列出了怎么用javax.management.openmbean.ArrayType的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: datakernel   文件: ExceptionStatsTest.java
@Before
public void before() throws OpenDataException {
	exceptionDetailsItemNames = new String[]{
			"lastException",
			"lastExceptionCausedObject",
			"lastExceptionStackTrace",
			"lastExceptionTimestamp",
			"totalExceptions"
	};

	exceptionDetailsItemTypes = new OpenType<?>[]{
			SimpleType.STRING,
			SimpleType.STRING,
			new ArrayType<>(1, SimpleType.STRING),
			SimpleType.LONG,
			SimpleType.INTEGER
	};
}
 
源代码2 项目: dragonwell8_jdk   文件: LazyCompositeData.java
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
    if (ot1 instanceof CompositeType) {
        if (! (ot2 instanceof CompositeType))
            return false;
        if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
            return false;
    } else if (ot1 instanceof TabularType) {
        if (! (ot2 instanceof TabularType))
            return false;
        if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
            return false;
    } else if (ot1 instanceof ArrayType) {
        if (! (ot2 instanceof ArrayType))
            return false;
        if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
            return false;
        }
    } else if (!ot1.equals(ot2)) {
        return false;
    }
    return true;
}
 
源代码3 项目: hottub   文件: DefaultMXBeanMappingFactory.java
CollectionMapping(Type targetType,
                  ArrayType<?> openArrayType,
                  Class<?> openArrayClass,
                  MXBeanMapping elementMapping) {
    super(targetType, openArrayType);
    this.elementMapping = elementMapping;

    /* Determine the concrete class to be used when converting
       back to this Java type.  We convert all Lists to ArrayList
       and all Sets to TreeSet.  (TreeSet because it is a SortedSet,
       so works for both Set and SortedSet.)  */
    Type raw = ((ParameterizedType) targetType).getRawType();
    Class<?> c = (Class<?>) raw;
    final Class<?> collC;
    if (c == List.class)
        collC = ArrayList.class;
    else if (c == Set.class)
        collC = HashSet.class;
    else if (c == SortedSet.class)
        collC = TreeSet.class;
    else { // can't happen
        assert(false);
        collC = null;
    }
    collectionClass = Util.cast(collC);
}
 
源代码4 项目: jdk8u60   文件: DefaultMXBeanMappingFactory.java
CollectionMapping(Type targetType,
                  ArrayType<?> openArrayType,
                  Class<?> openArrayClass,
                  MXBeanMapping elementMapping) {
    super(targetType, openArrayType);
    this.elementMapping = elementMapping;

    /* Determine the concrete class to be used when converting
       back to this Java type.  We convert all Lists to ArrayList
       and all Sets to TreeSet.  (TreeSet because it is a SortedSet,
       so works for both Set and SortedSet.)  */
    Type raw = ((ParameterizedType) targetType).getRawType();
    Class<?> c = (Class<?>) raw;
    final Class<?> collC;
    if (c == List.class)
        collC = ArrayList.class;
    else if (c == Set.class)
        collC = HashSet.class;
    else if (c == SortedSet.class)
        collC = TreeSet.class;
    else { // can't happen
        assert(false);
        collC = null;
    }
    collectionClass = Util.cast(collC);
}
 
@Test
public void testSimpleTypeExpressionList() throws Exception {
    ModelNode description = createDescription(ModelType.LIST, ModelType.INT);
    description.get(EXPRESSIONS_ALLOWED).set(true);
    TypeConverter converter = getConverter(description);
    ArrayType<?> arrayType = assertCast(ArrayType.class, converter.getOpenType());
    Assert.assertEquals(SimpleType.INTEGER, arrayType.getElementOpenType());

    ModelNode node = new ModelNode();
    node.add().set(new ValueExpression("${this.should.not.exist.!!!!!:1}"));
    node.add().set(new ValueExpression("${this.should.not.exist.!!!!!:2}"));

    Integer[] data = assertCast(Integer[].class, converter.fromModelNode(node));
    Assert.assertEquals(Integer.valueOf(1), data[0]);
    Assert.assertEquals(Integer.valueOf(2), data[1]);
}
 
源代码6 项目: openjdk-jdk8u   文件: LazyCompositeData.java
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
    if (ot1 instanceof CompositeType) {
        if (! (ot2 instanceof CompositeType))
            return false;
        if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
            return false;
    } else if (ot1 instanceof TabularType) {
        if (! (ot2 instanceof TabularType))
            return false;
        if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
            return false;
    } else if (ot1 instanceof ArrayType) {
        if (! (ot2 instanceof ArrayType))
            return false;
        if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
            return false;
        }
    } else if (!ot1.equals(ot2)) {
        return false;
    }
    return true;
}
 
源代码7 项目: jdk8u_jdk   文件: LazyCompositeData.java
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
    if (ot1 instanceof CompositeType) {
        if (! (ot2 instanceof CompositeType))
            return false;
        if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
            return false;
    } else if (ot1 instanceof TabularType) {
        if (! (ot2 instanceof TabularType))
            return false;
        if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
            return false;
    } else if (ot1 instanceof ArrayType) {
        if (! (ot2 instanceof ArrayType))
            return false;
        if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
            return false;
        }
    } else if (!ot1.equals(ot2)) {
        return false;
    }
    return true;
}
 
CollectionMapping(Type targetType,
                  ArrayType<?> openArrayType,
                  Class<?> openArrayClass,
                  MXBeanMapping elementMapping) {
    super(targetType, openArrayType);
    this.elementMapping = elementMapping;

    /* Determine the concrete class to be used when converting
       back to this Java type.  We convert all Lists to ArrayList
       and all Sets to TreeSet.  (TreeSet because it is a SortedSet,
       so works for both Set and SortedSet.)  */
    Type raw = ((ParameterizedType) targetType).getRawType();
    Class<?> c = (Class<?>) raw;
    final Class<?> collC;
    if (c == List.class)
        collC = ArrayList.class;
    else if (c == Set.class)
        collC = HashSet.class;
    else if (c == SortedSet.class)
        collC = TreeSet.class;
    else { // can't happen
        assert(false);
        collC = null;
    }
    collectionClass = Util.cast(collC);
}
 
@Test
public void testByteArrayObject() throws Exception {
    ModelNode description = createDescription(ModelType.OBJECT, ModelType.BYTES);
    TypeConverter converter = getConverter(description);

    assertMapType(assertCast(TabularType.class, converter.getOpenType()), SimpleType.STRING, ArrayType.getPrimitiveArrayType(byte[].class));

    ModelNode node = new ModelNode();
    node.get("one").set(new byte[] {1,2});
    node.get("two").set(new byte[] {3,4});

    TabularData tabularData = assertCast(TabularData.class, converter.fromModelNode(node));
    Assert.assertEquals(2, tabularData.size());
    Assert.assertTrue(Arrays.equals(new byte[] {1,2}, (byte[])tabularData.get(new Object[] {"one"}).get("value")));
    Assert.assertTrue(Arrays.equals(new byte[] {3,4}, (byte[])tabularData.get(new Object[] {"two"}).get("value")));

    //Allow plain map as well? Yeah why not!
    Map<String, byte[]> map = new HashMap<String, byte[]>();
    map.put("one", new byte[] {1,2});
    map.put("two", new byte[] {3,4});
    Assert.assertEquals(node, converter.toModelNode(map));
}
 
源代码10 项目: openjdk-jdk9   文件: TypeVersionMapper.java
private ArrayType<?> getVersionedArrayType(ArrayType<?> type, String version)
    throws OpenDataException
{
    if (type.isPrimitiveArray()) {
        return type;
    }
    OpenType<?> ot = getVersionedType(
        type.getElementOpenType(),
        version
    );
    if (ot instanceof SimpleType) {
        return new ArrayType<>((SimpleType<?>)ot, type.isPrimitiveArray());
    } else {
        return new ArrayType<>(type.getDimension(), ot);
    }
}
 
源代码11 项目: openjdk-jdk9   文件: LazyCompositeData.java
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
    if (ot1 instanceof CompositeType) {
        if (! (ot2 instanceof CompositeType))
            return false;
        if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
            return false;
    } else if (ot1 instanceof TabularType) {
        if (! (ot2 instanceof TabularType))
            return false;
        if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
            return false;
    } else if (ot1 instanceof ArrayType) {
        if (! (ot2 instanceof ArrayType))
            return false;
        if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
            return false;
        }
    } else if (!ot1.equals(ot2)) {
        return false;
    }
    return true;
}
 
源代码12 项目: openjdk-jdk9   文件: DefaultMXBeanMappingFactory.java
CollectionMapping(Type targetType,
                  ArrayType<?> openArrayType,
                  Class<?> openArrayClass,
                  MXBeanMapping elementMapping) {
    super(targetType, openArrayType);
    this.elementMapping = elementMapping;

    /* Determine the concrete class to be used when converting
       back to this Java type.  We convert all Lists to ArrayList
       and all Sets to TreeSet.  (TreeSet because it is a SortedSet,
       so works for both Set and SortedSet.)  */
    Type raw = ((ParameterizedType) targetType).getRawType();
    Class<?> c = (Class<?>) raw;
    final Class<?> collC;
    if (c == List.class)
        collC = ArrayList.class;
    else if (c == Set.class)
        collC = HashSet.class;
    else if (c == SortedSet.class)
        collC = TreeSet.class;
    else { // can't happen
        assert(false);
        collC = null;
    }
    collectionClass = Util.cast(collC);
}
 
源代码13 项目: jdk8u_jdk   文件: MerlinMXBean.java
static ArrayType make(int dims, OpenType baseType) {
    try {
        return new ArrayType(dims, baseType);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
源代码14 项目: jdk8u-jdk   文件: MerlinMXBean.java
static ArrayType make(SimpleType baseType, boolean primitiveArray) {
    try {
        return new ArrayType(baseType, primitiveArray);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
源代码15 项目: jdk8u-jdk   文件: MerlinMXBean.java
static ArrayType make(int dims, OpenType baseType) {
    try {
        return new ArrayType(dims, baseType);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
源代码16 项目: dragonwell8_jdk   文件: MerlinMXBean.java
static ArrayType make(SimpleType baseType, boolean primitiveArray) {
    try {
        return new ArrayType(baseType, primitiveArray);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
private MXBeanMapping
    makeArrayOrCollectionMapping(Type collectionType, Type elementType,
                                 MXBeanMappingFactory factory)
        throws OpenDataException {

    final MXBeanMapping elementMapping = factory.mappingForType(elementType, factory);
    final OpenType<?> elementOpenType = elementMapping.getOpenType();
    final ArrayType<?> openType = ArrayType.getArrayType(elementOpenType);
    final Class<?> elementOpenClass = elementMapping.getOpenClass();

    final Class<?> openArrayClass;
    final String openArrayClassName;
    if (elementOpenClass.isArray())
        openArrayClassName = "[" + elementOpenClass.getName();
    else
        openArrayClassName = "[L" + elementOpenClass.getName() + ";";
    try {
        openArrayClass = Class.forName(openArrayClassName);
    } catch (ClassNotFoundException e) {
        throw openDataException("Cannot obtain array class", e);
    }

    if (collectionType instanceof ParameterizedType) {
        return new CollectionMapping(collectionType,
                                     openType, openArrayClass,
                                     elementMapping);
    } else {
        if (isIdentity(elementMapping)) {
            return new IdentityMapping(collectionType,
                                       openType);
        } else {
            return new ArrayMapping(collectionType,
                                      openType,
                                      openArrayClass,
                                      elementMapping);
        }
    }
}
 
源代码18 项目: jdk8u-jdk   文件: MXBeanTest.java
private static void testMXBean(MBeanServer mbs, ObjectName on)
        throws Exception {
    MBeanInfo mbi = mbs.getMBeanInfo(on);
    MBeanAttributeInfo[] attrs = mbi.getAttributes();
    int nattrs = attrs.length;
    if (mbi.getAttributes().length != 1)
        failure("wrong number of attributes: " + attrs);
    else {
        MBeanAttributeInfo mbai = attrs[0];
        if (mbai.getName().equals("Ints")
            && mbai.isReadable() && !mbai.isWritable()
            && mbai.getDescriptor().getFieldValue("openType")
                .equals(new ArrayType<int[]>(SimpleType.INTEGER, true))
            && attrs[0].getType().equals("[I"))
            success("MBeanAttributeInfo");
        else
            failure("MBeanAttributeInfo: " + mbai);
    }

    int[] ints = (int[]) mbs.getAttribute(on, "Ints");
    if (equal(ints, new int[] {1, 2, 3}, null))
        success("getAttribute");
    else
        failure("getAttribute: " + Arrays.toString(ints));

    ExplicitMXBean proxy =
        JMX.newMXBeanProxy(mbs, on, ExplicitMXBean.class);
    int[] pints = proxy.getInts();
    if (equal(pints, new int[] {1, 2, 3}, null))
        success("getAttribute through proxy");
    else
        failure("getAttribute through proxy: " + Arrays.toString(pints));
}
 
源代码19 项目: dragonwell8_jdk   文件: ArrayTypeTest.java
private static void printArrayType(ArrayType a) {
    System.out.println("\tArrayType.getClassName() = " + a.getClassName());
    System.out.println("\tArrayType.getDescription() = " + a.getDescription());
    System.out.println("\tArrayType.getTypeName() = " + a.getTypeName());
    System.out.println("\tArrayType.isArray() = " + a.isArray());
    System.out.println("\tArrayType.isPrimitiveArray() = " + a.isPrimitiveArray());
    System.out.println("\tArrayType.getDimension() = " + a.getDimension());
}
 
源代码20 项目: jdk8u-jdk   文件: ArrayTypeTest.java
private static void printArrayType(ArrayType a) {
    System.out.println("\tArrayType.getClassName() = " + a.getClassName());
    System.out.println("\tArrayType.getDescription() = " + a.getDescription());
    System.out.println("\tArrayType.getTypeName() = " + a.getTypeName());
    System.out.println("\tArrayType.isArray() = " + a.isArray());
    System.out.println("\tArrayType.isPrimitiveArray() = " + a.isPrimitiveArray());
    System.out.println("\tArrayType.getDimension() = " + a.getDimension());
}
 
源代码21 项目: jdk8u-jdk   文件: MerlinMXBean.java
static ArrayType make(int dims, OpenType baseType) {
    try {
        return new ArrayType(dims, baseType);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
private MXBeanMapping
    makeArrayOrCollectionMapping(Type collectionType, Type elementType,
                                 MXBeanMappingFactory factory)
        throws OpenDataException {

    final MXBeanMapping elementMapping = factory.mappingForType(elementType, factory);
    final OpenType<?> elementOpenType = elementMapping.getOpenType();
    final ArrayType<?> openType = ArrayType.getArrayType(elementOpenType);
    final Class<?> elementOpenClass = elementMapping.getOpenClass();

    final Class<?> openArrayClass;
    final String openArrayClassName;
    if (elementOpenClass.isArray())
        openArrayClassName = "[" + elementOpenClass.getName();
    else
        openArrayClassName = "[L" + elementOpenClass.getName() + ";";
    try {
        openArrayClass = Class.forName(openArrayClassName);
    } catch (ClassNotFoundException e) {
        throw openDataException("Cannot obtain array class", e);
    }

    if (collectionType instanceof ParameterizedType) {
        return new CollectionMapping(collectionType,
                                     openType, openArrayClass,
                                     elementMapping);
    } else {
        if (isIdentity(elementMapping)) {
            return new IdentityMapping(collectionType,
                                       openType);
        } else {
            return new ArrayMapping(collectionType,
                                      openType,
                                      openArrayClass,
                                      elementMapping);
        }
    }
}
 
源代码23 项目: wildfly-core   文件: TypeConverters.java
@Override
public OpenType<?> getOpenType() {
    try {
        return ArrayType.getArrayType(getConverter(valueTypeNode, null).getOpenType());
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
源代码24 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType streamStateType_4_0_0() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.StreamState";
  String description = "StreamState";
  String[] itemNames = {
      "currentRxBytes",
      "currentTxBytes",
      "description",
      "planId",
      "rxPercentage",
      "sessions",
      "totalRxBytes",
      "totalTxBytes",
      "txPercentage"
  };
  String[] itemDescriptions = {
      "currentRxBytes",
      "currentTxBytes",
      "description",
      "planId",
      "rxPercentage",
      "sessions",
      "totalRxBytes",
      "totalTxBytes",
      "txPercentage"
  };
  OpenType[] itemTypes = {
      SimpleType.LONG,
      SimpleType.LONG,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.DOUBLE,
      ArrayType.getArrayType(makeSessionsType4_0()),
      SimpleType.LONG,
      SimpleType.LONG,
      SimpleType.DOUBLE
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码25 项目: TencentKona-8   文件: MerlinMXBean.java
static ArrayType make(SimpleType baseType, boolean primitiveArray) {
    try {
        return new ArrayType(baseType, primitiveArray);
    } catch (OpenDataException e) {
        throw new Error(e);
    }
}
 
源代码26 项目: TencentKona-8   文件: MXBeanTest.java
private static void testMXBean(MBeanServer mbs, ObjectName on)
        throws Exception {
    MBeanInfo mbi = mbs.getMBeanInfo(on);
    MBeanAttributeInfo[] attrs = mbi.getAttributes();
    int nattrs = attrs.length;
    if (mbi.getAttributes().length != 1)
        failure("wrong number of attributes: " + attrs);
    else {
        MBeanAttributeInfo mbai = attrs[0];
        if (mbai.getName().equals("Ints")
            && mbai.isReadable() && !mbai.isWritable()
            && mbai.getDescriptor().getFieldValue("openType")
                .equals(new ArrayType<int[]>(SimpleType.INTEGER, true))
            && attrs[0].getType().equals("[I"))
            success("MBeanAttributeInfo");
        else
            failure("MBeanAttributeInfo: " + mbai);
    }

    int[] ints = (int[]) mbs.getAttribute(on, "Ints");
    if (equal(ints, new int[] {1, 2, 3}, null))
        success("getAttribute");
    else
        failure("getAttribute: " + Arrays.toString(ints));

    ExplicitMXBean proxy =
        JMX.newMXBeanProxy(mbs, on, ExplicitMXBean.class);
    int[] pints = proxy.getInts();
    if (equal(pints, new int[] {1, 2, 3}, null))
        success("getAttribute through proxy");
    else
        failure("getAttribute through proxy: " + Arrays.toString(pints));
}
 
源代码27 项目: openjdk-8   文件: DefaultMXBeanMappingFactory.java
private MXBeanMapping
    makeArrayOrCollectionMapping(Type collectionType, Type elementType,
                                 MXBeanMappingFactory factory)
        throws OpenDataException {

    final MXBeanMapping elementMapping = factory.mappingForType(elementType, factory);
    final OpenType<?> elementOpenType = elementMapping.getOpenType();
    final ArrayType<?> openType = ArrayType.getArrayType(elementOpenType);
    final Class<?> elementOpenClass = elementMapping.getOpenClass();

    final Class<?> openArrayClass;
    final String openArrayClassName;
    if (elementOpenClass.isArray())
        openArrayClassName = "[" + elementOpenClass.getName();
    else
        openArrayClassName = "[L" + elementOpenClass.getName() + ";";
    try {
        openArrayClass = Class.forName(openArrayClassName);
    } catch (ClassNotFoundException e) {
        throw openDataException("Cannot obtain array class", e);
    }

    if (collectionType instanceof ParameterizedType) {
        return new CollectionMapping(collectionType,
                                     openType, openArrayClass,
                                     elementMapping);
    } else {
        if (isIdentity(elementMapping)) {
            return new IdentityMapping(collectionType,
                                       openType);
        } else {
            return new ArrayMapping(collectionType,
                                      openType,
                                      openArrayClass,
                                      elementMapping);
        }
    }
}
 
源代码28 项目: jdk8u-dev-jdk   文件: MXBeanTest.java
private static void testMXBean(MBeanServer mbs, ObjectName on)
        throws Exception {
    MBeanInfo mbi = mbs.getMBeanInfo(on);
    MBeanAttributeInfo[] attrs = mbi.getAttributes();
    int nattrs = attrs.length;
    if (mbi.getAttributes().length != 1)
        failure("wrong number of attributes: " + attrs);
    else {
        MBeanAttributeInfo mbai = attrs[0];
        if (mbai.getName().equals("Ints")
            && mbai.isReadable() && !mbai.isWritable()
            && mbai.getDescriptor().getFieldValue("openType")
                .equals(new ArrayType<int[]>(SimpleType.INTEGER, true))
            && attrs[0].getType().equals("[I"))
            success("MBeanAttributeInfo");
        else
            failure("MBeanAttributeInfo: " + mbai);
    }

    int[] ints = (int[]) mbs.getAttribute(on, "Ints");
    if (equal(ints, new int[] {1, 2, 3}, null))
        success("getAttribute");
    else
        failure("getAttribute: " + Arrays.toString(ints));

    ExplicitMXBean proxy =
        JMX.newMXBeanProxy(mbs, on, ExplicitMXBean.class);
    int[] pints = proxy.getInts();
    if (equal(pints, new int[] {1, 2, 3}, null))
        success("getAttribute through proxy");
    else
        failure("getAttribute through proxy: " + Arrays.toString(pints));
}
 
源代码29 项目: jdk8u60   文件: DefaultMXBeanMappingFactory.java
private MXBeanMapping
    makeArrayOrCollectionMapping(Type collectionType, Type elementType,
                                 MXBeanMappingFactory factory)
        throws OpenDataException {

    final MXBeanMapping elementMapping = factory.mappingForType(elementType, factory);
    final OpenType<?> elementOpenType = elementMapping.getOpenType();
    final ArrayType<?> openType = ArrayType.getArrayType(elementOpenType);
    final Class<?> elementOpenClass = elementMapping.getOpenClass();

    final Class<?> openArrayClass;
    final String openArrayClassName;
    if (elementOpenClass.isArray())
        openArrayClassName = "[" + elementOpenClass.getName();
    else
        openArrayClassName = "[L" + elementOpenClass.getName() + ";";
    try {
        openArrayClass = Class.forName(openArrayClassName);
    } catch (ClassNotFoundException e) {
        throw openDataException("Cannot obtain array class", e);
    }

    if (collectionType instanceof ParameterizedType) {
        return new CollectionMapping(collectionType,
                                     openType, openArrayClass,
                                     elementMapping);
    } else {
        if (isIdentity(elementMapping)) {
            return new IdentityMapping(collectionType,
                                       openType);
        } else {
            return new ArrayMapping(collectionType,
                                      openType,
                                      openArrayClass,
                                      elementMapping);
        }
    }
}
 
@Test
public void testBytesConverter() {
    ModelNode description = createDescription(ModelType.BYTES);
    TypeConverter converter = getConverter(description);
    Assert.assertEquals(ArrayType.getPrimitiveArrayType(byte[].class), converter.getOpenType());
    Assert.assertTrue(Arrays.equals(new byte[] {1,2,3}, assertCast(byte[].class, converter.fromModelNode(new ModelNode().set(new byte[] {1,2,3})))));
    Assert.assertTrue(Arrays.equals(new byte[] {1,2,3}, converter.toModelNode(new byte[] {1,2,3}).asBytes()));
    byte[][] bytes = assertCast(byte[][].class, converter.toArray(createList(new byte[] {1,2,3}, new byte[] {4,5,6})));
    Assert.assertEquals(2, bytes.length);
    Assert.assertTrue(Arrays.equals(new byte[] {1,2,3}, bytes[0]));
    Assert.assertTrue(Arrays.equals(new byte[] {4,5,6}, bytes[1]));
}
 
 类所在包
 同包方法