You can't instantiate a generic type, especially with a custom constructor. This is definitely a code smell, but if it's really required you'll have to look into Reflection.
new L( //...
marciojc wrote:Why do you want to? You typically add restrictions because you rely on some part of a common interface (for instance, with comparable you need to know that the compareTo method will be there when you look for it). What are you trying to gain by needlessly restricting the Label type?
how can i ensures that Label Type is only Integer,Boolean,Double,FLoat or Complex??