You can solve the problem of specialized methods by using Scala language. It
Scala can inline methods, this (in combination with easy higher order function usage) makes it possible to avoid code duplication for free — this looks like the main problem mentioned in your answer.
But also, Scala has syntactic macros, which makes it possible to do a lot of things with code at compile time in a type-safe manner.
And the common problem of boxing primitive types when used in generics is possible to solve in Scala, too: it can do generic specialization for primitives to avoid boxing automatically by using @specialized annotation, and nobody would ever see any generated code, because only bytecode is generated — this thing is built into language itself. So, basically, you'll write one generic method in Scala, and it will run with the speed of specialized methods. And if you need fast generic arithmetics too, it's easily doable by using Typeclass "pattern" for injecting the operations and values for different numeric types.
Also
Also, Scala is awesome in many other ways. And you don't have to rewrite all code to Scala, because Scala <-> Java interoperability is excellent. Just make sure to use SBT (scala build tool) for building the project.