@Test public void testGetDefaultCollectionImplClass() throws Exception { assertNull(writerUtil.getDefaultCollectionImplClass(CollectionType.NONE)); assertNull(writerUtil.getDefaultCollectionImplClass(CollectionType.ARRAY)); assertEquals(LinkedList.class, writerUtil.getDefaultCollectionImplClass(CollectionType.LIST)); assertEquals(HashMap.class, writerUtil.getDefaultCollectionImplClass(CollectionType.MAP)); }
public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; }
JavaFieldWriterUtil { public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; } }
JavaFieldWriterUtil { public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; } JavaFieldWriterUtil(AtlasConversionService conversionService);  JavaFieldWriterUtil(ClassLoader classLoader, AtlasConversionService conversionService); }
JavaFieldWriterUtil { public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; } JavaFieldWriterUtil(AtlasConversionService conversionService);  JavaFieldWriterUtil(ClassLoader classLoader, AtlasConversionService conversionService); Object instantiateObject(Class<?> clz); Class<?> loadClass(String name); Class<?> getDefaultCollectionImplClass(CollectionType type); Object getChildObject(Object parentObject, SegmentContext segment); Object createComplexChildObject(Object parentObject, SegmentContext segmentContext, Class<?> clazz); Object createComplexChildObject(Object parentObject, SegmentContext segmentContext); void setChildObject(Object parentObject, Object childObject, SegmentContext segmentContext); Class<?> resolveChildClass(Object parentObject, SegmentContext segment); Object getCollectionItem(Object collectionObject, SegmentContext segmentContext); Object adjustCollectionSize(Object collectionObject, SegmentContext segmentContext); @SuppressWarnings({ "rawtypes", "unchecked" }) Object createComplexCollectionItem(Object collectionObject, Class<?> itemType, SegmentContext segmentContext); Object createComplexCollectionItem(Object parentObject, Object collectionObject, SegmentContext segmentContext); Class<?> resolveCollectionItemClass(Object parentObject, SegmentContext segmentContext); @SuppressWarnings({ "rawtypes", "unchecked" }) void setCollectionItem(Object collectionObject, Object item, SegmentContext segmentContext); Map<Class<?>, Class<?>> getDefaultCollectionImplClasses(); }
JavaFieldWriterUtil { public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; } JavaFieldWriterUtil(AtlasConversionService conversionService);  JavaFieldWriterUtil(ClassLoader classLoader, AtlasConversionService conversionService); Object instantiateObject(Class<?> clz); Class<?> loadClass(String name); Class<?> getDefaultCollectionImplClass(CollectionType type); Object getChildObject(Object parentObject, SegmentContext segment); Object createComplexChildObject(Object parentObject, SegmentContext segmentContext, Class<?> clazz); Object createComplexChildObject(Object parentObject, SegmentContext segmentContext); void setChildObject(Object parentObject, Object childObject, SegmentContext segmentContext); Class<?> resolveChildClass(Object parentObject, SegmentContext segment); Object getCollectionItem(Object collectionObject, SegmentContext segmentContext); Object adjustCollectionSize(Object collectionObject, SegmentContext segmentContext); @SuppressWarnings({ "rawtypes", "unchecked" }) Object createComplexCollectionItem(Object collectionObject, Class<?> itemType, SegmentContext segmentContext); Object createComplexCollectionItem(Object parentObject, Object collectionObject, SegmentContext segmentContext); Class<?> resolveCollectionItemClass(Object parentObject, SegmentContext segmentContext); @SuppressWarnings({ "rawtypes", "unchecked" }) void setCollectionItem(Object collectionObject, Object item, SegmentContext segmentContext); Map<Class<?>, Class<?>> getDefaultCollectionImplClasses();  }