@Test public void testBoxOrUnboxPrimitive() { assertEquals(Boolean.class, service.boxOrUnboxPrimitive(boolean.class)); assertEquals(boolean.class, service.boxOrUnboxPrimitive(Boolean.class)); assertEquals(Byte.class, service.boxOrUnboxPrimitive(byte.class)); assertEquals(byte.class, service.boxOrUnboxPrimitive(Byte.class)); assertEquals(Character.class, service.boxOrUnboxPrimitive(char.class)); assertEquals(char.class, service.boxOrUnboxPrimitive(Character.class)); assertEquals(Double.class, service.boxOrUnboxPrimitive(double.class)); assertEquals(double.class, service.boxOrUnboxPrimitive(Double.class)); assertEquals(Float.class, service.boxOrUnboxPrimitive(float.class)); assertEquals(float.class, service.boxOrUnboxPrimitive(Float.class)); assertEquals(Integer.class, service.boxOrUnboxPrimitive(int.class)); assertEquals(int.class, service.boxOrUnboxPrimitive(Integer.class)); assertEquals(Long.class, service.boxOrUnboxPrimitive(long.class)); assertEquals(long.class, service.boxOrUnboxPrimitive(Long.class)); assertEquals(Short.class, service.boxOrUnboxPrimitive(short.class)); assertEquals(short.class, service.boxOrUnboxPrimitive(Short.class)); assertEquals(String.class, service.boxOrUnboxPrimitive(String.class)); assertNotEquals(Boolean.class, service.boxOrUnboxPrimitive(Boolean.class)); assertNotEquals(boolean.class, service.boxOrUnboxPrimitive(boolean.class)); assertNotEquals(Byte.class, service.boxOrUnboxPrimitive(Byte.class)); assertNotEquals(byte.class, service.boxOrUnboxPrimitive(byte.class)); assertNotEquals(Character.class, service.boxOrUnboxPrimitive(Character.class)); assertNotEquals(char.class, service.boxOrUnboxPrimitive(char.class)); assertNotEquals(Double.class, service.boxOrUnboxPrimitive(Double.class)); assertNotEquals(double.class, service.boxOrUnboxPrimitive(double.class)); assertNotEquals(Float.class, service.boxOrUnboxPrimitive(Float.class)); assertNotEquals(float.class, service.boxOrUnboxPrimitive(float.class)); assertNotEquals(Integer.class, service.boxOrUnboxPrimitive(Integer.class)); assertNotEquals(int.class, service.boxOrUnboxPrimitive(int.class)); assertNotEquals(Long.class, service.boxOrUnboxPrimitive(Long.class)); assertNotEquals(long.class, service.boxOrUnboxPrimitive(long.class)); assertNotEquals(Short.class, service.boxOrUnboxPrimitive(Short.class)); assertNotEquals(short.class, service.boxOrUnboxPrimitive(short.class)); assertNotEquals(String.class, service.boxOrUnboxPrimitive(List.class)); assertNull(service.boxOrUnboxPrimitive((Class<?>)null)); }
@Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); }
DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } }
DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } private  DefaultAtlasConversionService(); }
DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } 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 Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } 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);  }