use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType in project java-chassis by ServiceComb.
the class Fixed32ReadSchemas method create.
public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) {
JavaType javaType = propertyDescriptor.getJavaType();
if (int.class.equals(javaType.getRawClass())) {
return new Fixed32PrimitiveSchema<>(protoField, propertyDescriptor);
}
if (Integer.class.equals(javaType.getRawClass()) || javaType.isJavaLangObject()) {
return new Fixed32Schema<>(protoField, propertyDescriptor);
}
ProtoUtils.throwNotSupportMerge(protoField, propertyDescriptor.getJavaType());
return null;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType in project java-chassis by ServiceComb.
the class FloatReadSchemas method create.
public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) {
JavaType javaType = propertyDescriptor.getJavaType();
if (float.class.equals(javaType.getRawClass())) {
return new FloatPrimitiveSchema<>(protoField, propertyDescriptor);
}
if (Float.class.equals(javaType.getRawClass()) || javaType.isJavaLangObject()) {
return new FloatSchema<>(protoField, propertyDescriptor);
}
ProtoUtils.throwNotSupportMerge(protoField, propertyDescriptor.getJavaType());
return null;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType in project java-chassis by ServiceComb.
the class EnumsReadSchemas method create.
public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) {
JavaType javaType = propertyDescriptor.getJavaType();
if (javaType.isEnumType()) {
return new EnumSchema<>(protoField, propertyDescriptor);
}
if (Integer.class.equals(javaType.getRawClass()) || javaType.isJavaLangObject()) {
return new IntEnumSchema<>(protoField, propertyDescriptor);
}
if (int.class.equals(javaType.getRawClass())) {
return new IntPrimitiveEnumSchema<>(protoField, propertyDescriptor);
}
if (javaType.isTypeOrSubTypeOf(DynamicEnum.class)) {
return new DynamicEnumSchema<>(protoField, propertyDescriptor);
}
ProtoUtils.throwNotSupportMerge(protoField, propertyDescriptor.getJavaType());
return null;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType in project java-chassis by ServiceComb.
the class Fixed64ReadSchemas method create.
public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) {
JavaType javaType = propertyDescriptor.getJavaType();
if (long.class.equals(javaType.getRawClass())) {
return new Fixed64PrimitiveSchema<>(protoField, propertyDescriptor);
}
if (Long.class.equals(javaType.getRawClass()) || javaType.isJavaLangObject()) {
return new Fixed64Schema<>(protoField, propertyDescriptor);
}
ProtoUtils.throwNotSupportMerge(protoField, propertyDescriptor.getJavaType());
return null;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JavaType in project java-chassis by ServiceComb.
the class SInt32ReadSchemas method create.
public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) {
JavaType javaType = propertyDescriptor.getJavaType();
if (int.class.equals(javaType.getRawClass())) {
return new SInt32PrimitiveSchema<>(protoField, propertyDescriptor);
}
if (Integer.class.equals(javaType.getRawClass()) || javaType.isJavaLangObject()) {
return new SInt32Schema<>(protoField, propertyDescriptor);
}
ProtoUtils.throwNotSupportMerge(protoField, propertyDescriptor.getJavaType());
return null;
}
Aggregations