return new SkeletonProperty(skel);
else
return null;
}
else if (type instanceof ParameterizedType) {
ParameterizedType ptype = (ParameterizedType) type;
Type rawType = ptype.getRawType();
if (rawType instanceof Class) {
Class rawClass = (Class) rawType;
if (Map.class.isAssignableFrom(rawClass)) {
Type[] args = ptype.getActualTypeArguments();
if (args.length != 2)
throw new JAXBException(L.l("unexpected number of generic arguments for Map<>: {0}", args.length));
Property keyProperty = createProperty(args[0], anyType);
Property valueProperty = createProperty(args[1], anyType);
return new MapProperty(rawClass, keyProperty, valueProperty);
}
if (Collection.class.isAssignableFrom(rawClass)) {
Type[] args = ptype.getActualTypeArguments();
if (args.length != 1)
throw new JAXBException(L.l("unexpected number of generic arguments for List<>: {0}", args.length));
Property componentProperty = createProperty(args[0], anyType);