private static void addSetOpenEngSBModelTail ( CtClass clazz ) throws CannotCompileException , NotFoundException { CtClass [ ] params = generateClassField ( List . class ) ; CtMethod method = new CtMethod ( CtClass . voidType , "setOpenEngSBModelTail" , params , clazz ) ; StringBuilder builder = new StringBuilder ( ) ; builder . append ( createTrace ( "Called setOpenEngSBModelTail" ) ) . append ( "if($1 != null) {for(int i = 0; i < $1.size(); i++) {" ) . append ( "OpenEngSBModelEntry entry = (OpenEngSBModelEntry) $1.get(i);" ) . append ( String . format ( "%s.put(entry.getKey(), entry); } }" , TAIL_FIELD ) ) ; method . setBody ( createMethodBody ( builder . toString ( ) ) ) ; clazz . addMethod ( method ) ; }
Adds the setOpenEngSBModelTail method to the class .