Hello. I have this situation - there is a class, it declares one public constructor (without parameters) and one protected - with parameters. I need one that is protected with parameters. I inherit from the original class, I define the public constructor in it, and from there I call the protected constructor of the base class, but Spring, when I raise my bin (the inherited class), it says the designer is not public . This situation can somehow get around?
Code:
public class MultiValueMapContainer extends MultiValueMap { private int queueCapacity; public MultiValueMapContainer(int queueCapacity) { super(new HashMap(), new InstantiateFactory(ArrayBlockingQueue.class, new Class[]{Integer.class}, new Object[]{queueCapacity})); this.queueCapacity = queueCapacity; } public int getQueueCapacity() { return queueCapacity; }} In MultiValueMap :
protected MultiValueMap(java.util.Map map, Factory collectionFactory) The InstantiateFactory constructor is public :
<bean name="MyMap" class="package.MultiValueMapContainer"> <constructor-arg type="int" value="${initialSeriesCount}"/> </bean>