Skip to content

Instantly share code, notes, and snippets.

/Annotation.java

Created Aug 14, 2015
Embed
What would you like to do?
AST ast = unsupportedStmt.getAST();
NormalAnnotation annotation = ast.newNormalAnnotation();
annotation.setTypeName(ast.newSimpleName("Deprecated"));
astRewrite.getListRewrite(methodDecl, MethodDeclaration.MODIFIERS2_PROPERTY)
.insertAt(annotation, 0, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment