How can I make parameterized method?
<p>I have similar class for making Product factory:</p>

<pre><code>package com.nda.generics;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.nda.generics.Sizeable.Size;

public class ProductFactory{

        private Collection&lt;? extends Sizeable&gt; sources;

        public ProductFactory(Collection&lt;? extends Sizeable&gt; sources) {
            this.sources=sources;
        }

        public void setSources(Collection&lt;? extends Sizeable&gt; sources) {
            this.sources=sources;
        }

        public Collection&lt;Product&gt; makeProductList() {

            Collection&lt;Product&gt; products=new ArrayList&lt;Product&gt;();

            for (Sizeable item:sources) {

                switch(item.getSize()) {

                    case BIG: products.add(new Sausage()); break;
                    case MIDDLE: products.add(new Feets()); break;
                    case LITTLE: products.add(new Conservative()); break;
                }
            }

            return products;
        }

        public class Conservative extends Product {

            private Conservative(){}
        }

        public class Feets extends Product {

            private Feets(){}
        }

        public class Sausage extends Product {

            private Sausage(){}
        }
    }
</code></pre>

<p>This factory makes list of products using size of animals. But I also need to parameterize method/class that I will set type of product, for exampe new Feets (using parameters of constructor). How can I do it? Thank you. </p>
