internalType = ((ReferenceType) internalType).getType();
}
}
if (internalType instanceof PrimitiveType) {
final PrimitiveType pt = (PrimitiveType) internalType;
if (pt.getType().equals(Primitive.Boolean)) {
return new JavaType(Boolean.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Char)) {
return new JavaType(Character.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Byte)) {
return new JavaType(Byte.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Short)) {
return new JavaType(Short.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Int)) {
return new JavaType(Integer.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Long)) {
return new JavaType(Long.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Float)) {
return new JavaType(Float.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
if (pt.getType().equals(Primitive.Double)) {
return new JavaType(Double.class.getName(), array,
DataType.PRIMITIVE, null, null);
}
throw new IllegalStateException("Unsupported primitive '"
+ pt.getType() + "'");
}
if (internalType instanceof WildcardType) {
// We only provide very primitive support for wildcard types; Roo
// only needs metadata at the end of the day,