AnonymousClassDeclaration getBody()
{
final EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstant.getInternal();
synchronized (enumConstantDeclaration)
{
AnonymousClassDeclaration result = enumConstantDeclaration.getAnonymousClassDeclaration();
if (result == null)
{
final String stub = "enum StubEnum { FOO() {}; }";
final JavaEnumSource temp = JavaParser.parse(JavaEnumSource.class, stub);
final AnonymousClassDeclaration body = ((EnumConstantBodyImpl) temp.getEnumConstants().get(0).getBody())
.getBody();
final AST ast = ((ASTNode) javaEnum.getInternal()).getAST();
result = (AnonymousClassDeclaration) ASTNode.copySubtree(ast, body);
enumConstantDeclaration.setAnonymousClassDeclaration(result);
}