Handling Repeated Code Automatically

Learn how to deal with repeated Java code automatically!

In this article, I will describe how you can use the Java::Geci generator Repeated to overcome the Java language shortage that generics cannot be primitive. The example is a suggested extension of the Apache Commons Lang library.

When you copy-paste code, you do something wrong. At least that is the perception. You have to create your code structure in a more generalized way so that you can use different parameters instead of similar code many times.