protected String generateOgnlGetter ( CtClass clazz , CtMethod valueGetter , CtField node ) throws Exception { String body = "return " + node . getName ( ) + ".getValue($1, $2);" ; valueGetter . setBody ( body ) ; clazz . addMethod ( valueGetter ) ; return body ; }
Fail safe getter creation when normal compilation fails .