private static List<Method> adaptConstructors(List<Method> methods, TypeDef target) {
        List<Method> adapted = new ArrayList<Method>();
        for (Method m : methods) {
            adapted.add(new MethodBuilder(m)
                    .withName(null)
                    .withReturnType(target.toUnboundedReference())
                    .build());
        }
        return adapted;
    }
private static List < Method > adaptConstructors ( List < Method > methods , TypeDef target ) { List < Method > adapted = new ArrayList < Method > ( ) ; for ( Method m : methods ) { adapted . add ( new MethodBuilder ( m ) . withName ( null ) . withReturnType ( target . toUnboundedReference ( ) ) . build ( ) ) ; } return adapted ; }
The method adapts constructor method to the current class. It unsets any name that may be
presetn in the method. It also sets as a return type a reference to the current type.