public static RamlParamType mapSimpleType(Class<?> clazz){
  Class<?> targetClazz=clazz;
  if (targetClazz.isArray() && clazz.getComponentType() != null) {
    targetClazz=clazz.getComponentType();
  }
  if (targetClazz.equals(Long.TYPE) || targetClazz.equals(Long.class) || targetClazz.equals(Integer.TYPE)|| targetClazz.equals(Integer.class)|| targetClazz.equals(Short.TYPE)|| targetClazz.equals(Short.class)|| targetClazz.equals(Byte.TYPE)|| targetClazz.equals(Byte.class)) {
    return RamlParamType.INTEGER;
  }
 else   if (targetClazz.equals(Float.TYPE) || targetClazz.equals(Float.class) || targetClazz.equals(Double.TYPE)|| targetClazz.equals(Double.class)|| targetClazz.equals(BigDecimal.class)) {
    return RamlParamType.NUMBER;
  }
 else   if (targetClazz.equals(Boolean.class) || targetClazz.equals(Boolean.TYPE)) {
    return RamlParamType.BOOLEAN;
  }
 else   if (targetClazz.equals(String.class)) {
    return RamlParamType.STRING;
  }
  return null;
}

public static RamlParamType mapSimpleType ( Class < ? > clazz ) { Class < ? > targetClazz = clazz ; if ( targetClazz . isArray ( ) && clazz . getComponentType ( ) != null ) { targetClazz = clazz . getComponentType ( ) ; } if ( targetClazz . equals ( Long . TYPE ) || targetClazz . equals ( Long . class ) || targetClazz . equals ( Integer . TYPE ) || targetClazz . equals ( Integer . class ) || targetClazz . equals ( Short . TYPE ) || targetClazz . equals ( Short . class ) || targetClazz . equals ( Byte . TYPE ) || targetClazz . equals ( Byte . class ) ) { return RamlParamType . INTEGER ; } else if ( targetClazz . equals ( Float . TYPE ) || targetClazz . equals ( Float . class ) || targetClazz . equals ( Double . TYPE ) || targetClazz . equals ( Double . class ) || targetClazz . equals ( BigDecimal . class ) ) { return RamlParamType . NUMBER ; } else if ( targetClazz . equals ( Boolean . class ) || targetClazz . equals ( Boolean . TYPE ) ) { return RamlParamType . BOOLEAN ; } else if ( targetClazz . equals ( String . class ) ) { return RamlParamType . STRING ; } return null ; }
maps primitives and other simple java types into simple types supported by raml
