/** * Constructs a new {@code BeanModuleDescriptor} instance. * * @param name * the name of the descriptor (the actual module class name). * @param moduleObjectReferencedDescriptor * the component descriptor of the module objects. */ protected BeanCollectionModuleDescriptor(String name, IComponentDescriptor<?> moduleObjectReferencedDescriptor) { super(name); BasicListDescriptor<Object> moduleObjectsListDescriptor = new BasicListDescriptor<>(); moduleObjectsListDescriptor .setElementDescriptor(moduleObjectReferencedDescriptor); BasicCollectionPropertyDescriptor<Object> moduleObjectsDescriptor = new BasicCollectionPropertyDescriptor<>(); moduleObjectsDescriptor .setReferencedDescriptor(moduleObjectsListDescriptor); moduleObjectsDescriptor.setName(BeanCollectionModule.MODULE_OBJECTS); List<IPropertyDescriptor> propertyDescriptors = new ArrayList<>( getPropertyDescriptors()); propertyDescriptors.add(moduleObjectsDescriptor); setPropertyDescriptors(propertyDescriptors); }
/** * Constructs a new <code>BeanModuleDescriptor</code> instance. * * @param name * the name of the descriptor (the actual module class name). * @param moduleObjectReferencedDescriptor * the component descriptor of the module objects. */ protected BeanCollectionModuleDescriptor(String name, IComponentDescriptor<Object> moduleObjectReferencedDescriptor) { super(name); BasicCollectionDescriptor<Object> moduleObjectsListDescriptor = new BasicCollectionDescriptor<Object>(); moduleObjectsListDescriptor.setCollectionInterface(List.class); moduleObjectsListDescriptor .setElementDescriptor(moduleObjectReferencedDescriptor); BasicCollectionPropertyDescriptor<Object> moduleObjectsDescriptor = new BasicCollectionPropertyDescriptor<Object>(); moduleObjectsDescriptor .setReferencedDescriptor(moduleObjectsListDescriptor); moduleObjectsDescriptor.setName("moduleObjects"); List<IPropertyDescriptor> propertyDescriptors = new ArrayList<IPropertyDescriptor>( getPropertyDescriptors()); propertyDescriptors.add(moduleObjectsDescriptor); setPropertyDescriptors(propertyDescriptors); }