public static ArrayProperty createArrayProperty(Property componentProperty, Class type) throws JAXBException { if (!type.isPrimitive()) return new ObjectArrayProperty(componentProperty, type); if (Double.TYPE.equals(type)) return DoubleArrayProperty.PROPERTY; if (Float.TYPE.equals(type)) return FloatArrayProperty.PROPERTY; if (Integer.TYPE.equals(type)) return IntegerArrayProperty.PROPERTY; if (Long.TYPE.equals(type)) return LongArrayProperty.PROPERTY; if (Boolean.TYPE.equals(type)) return BooleanArrayProperty.PROPERTY; if (Character.TYPE.equals(type)) return CharacterArrayProperty.PROPERTY; if (Short.TYPE.equals(type)) return ShortArrayProperty.PROPERTY; /* XXX if (Byte.TYPE.equals(type)) return ByteArrayProperty.PROPERTY; */ throw new JAXBException(L.l("{0} is neither primitive, nor non-primitive!", type)); }