@Test public void testFieldTypeFromClass() { String className = null; assertEquals(FieldType.NONE, service.fieldTypeFromClass(className)); className = ""; assertEquals(FieldType.NONE, service.fieldTypeFromClass(className)); Class<String> klass = null; assertNull(service.fieldTypeFromClass(klass)); assertNotNull(service.fieldTypeFromClass(Object.class)); assertNotNull(service.fieldTypeFromClass(Boolean.class)); assertNotNull(service.fieldTypeFromClass(Byte.class)); assertNotNull(service.fieldTypeFromClass(Character.class)); assertNotNull(service.fieldTypeFromClass(Double.class)); assertNotNull(service.fieldTypeFromClass(Float.class)); assertNotNull(service.fieldTypeFromClass(Integer.class)); assertNotNull(service.fieldTypeFromClass(Long.class)); assertNotNull(service.fieldTypeFromClass(Short.class)); assertNotNull(service.fieldTypeFromClass(String.class)); assertNotNull(service.fieldTypeFromClass(Year.class)); assertNotNull(service.fieldTypeFromClass(Month.class)); assertNotNull(service.fieldTypeFromClass(YearMonth.class)); assertNotNull(service.fieldTypeFromClass(MonthDay.class)); assertNotNull(service.fieldTypeFromClass(LocalDate.class)); assertNotNull(service.fieldTypeFromClass(LocalTime.class)); assertNotNull(service.fieldTypeFromClass(LocalDateTime.class)); assertNotNull(service.fieldTypeFromClass(java.sql.Date.class)); assertNotNull(service.fieldTypeFromClass(Date.class)); assertNotNull(service.fieldTypeFromClass(ZonedDateTime.class)); assertNotNull(service.fieldTypeFromClass("boolean")); assertNotNull(service.fieldTypeFromClass("byte")); assertNotNull(service.fieldTypeFromClass("char")); assertNotNull(service.fieldTypeFromClass("double")); assertNotNull(service.fieldTypeFromClass("float")); assertNotNull(service.fieldTypeFromClass("int")); assertNotNull(service.fieldTypeFromClass("long")); assertNotNull(service.fieldTypeFromClass("short")); }
@Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); }
DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } }
DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private  DefaultAtlasConversionService(); }
DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private  DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveClassNames(); @Override Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target); @Override Optional<AtlasConverter<?>> findMatchingConverter(String sourceClassName, String targetClassName); @Override Object copyPrimitive(Object sourceValue); @Override Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType); @Override Object convertType(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat); @Override Object convertType(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat); @Override boolean isConvertionAvailableFor(Object sourceValue, Class<?> targetType); @Override Boolean isPrimitive(String className); @Override Boolean isPrimitive(Class<?> clazz); @Override Boolean isPrimitive(FieldType fieldType); @Override Boolean isBoxedPrimitive(Class<?> clazz); @Override Class<?> boxOrUnboxPrimitive(String clazzName); @Override Class<?> boxOrUnboxPrimitive(Class<?> clazz); @Override FieldType fieldTypeFromClass(Class<?> clazz); @Override FieldType fieldTypeFromClass(String className); @Override Class<?> classFromFieldType(FieldType fieldType); @Override Boolean isAssignableFieldType(FieldType source, FieldType target); }
DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private  DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveClassNames(); @Override Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target); @Override Optional<AtlasConverter<?>> findMatchingConverter(String sourceClassName, String targetClassName); @Override Object copyPrimitive(Object sourceValue); @Override Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType); @Override Object convertType(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat); @Override Object convertType(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat); @Override boolean isConvertionAvailableFor(Object sourceValue, Class<?> targetType); @Override Boolean isPrimitive(String className); @Override Boolean isPrimitive(Class<?> clazz); @Override Boolean isPrimitive(FieldType fieldType); @Override Boolean isBoxedPrimitive(Class<?> clazz); @Override Class<?> boxOrUnboxPrimitive(String clazzName); @Override Class<?> boxOrUnboxPrimitive(Class<?> clazz); @Override FieldType fieldTypeFromClass(Class<?> clazz); @Override FieldType fieldTypeFromClass(String className); @Override Class<?> classFromFieldType(FieldType fieldType); @Override Boolean isAssignableFieldType(FieldType source, FieldType target);  }