I'm trying to add functionality to the Arrays-class. In my project I use the (static) methods from Arrays and have some other methods that also handle array-conversion, sorting, etc...
I'm trying to add these to an object MyArrays that extends Arrays so I can go
MyArrays.toList(foo);
but also
MyArrays.myOwnFunction(bar);
but i'm not able to extend it because Arrays-contructor has private access. I know it's not really necessary, but now I know i'm unable to do it, I realy want to. Is there any workaround for this?
thanks,
java.util.Arraysnorjava.lang.reflect.Arraycontain atoListmethod. However, since the reflect version isfinal, you can't extend it. And since both classes consist solely ofstaticmethods, do you really need to extend the class anyway?