private static void addFields ( CtClass clazz ) throws CannotCompileException , NotFoundException { CtField tail = CtField . make ( String . format ( "private Map %s = new HashMap();" , TAIL_FIELD ) , clazz ) ; clazz . addField ( tail ) ; String loggerDefinition = "private static final Logger %s = LoggerFactory.getLogger(%s.class.getName());" ; CtField logger = CtField . make ( String . format ( loggerDefinition , LOGGER_FIELD , clazz . getName ( ) ) , clazz ) ; clazz . addField ( logger ) ; }
Adds the fields for the model tail and the logger to the class .