Created
July 16, 2018 12:26
-
-
Save olegchir/a56bd93c7329ec3c20579b0089f82b6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clazz = new MethodCallExpression(new VariableExpression("this"), "getClass", EMPTY_ARGUMENTS) | |
def body = new ExpressionStatement(new MethodCallExpression(clazz, "getName", EMPTY_ARGUMENTS)) | |
classNode.addMethod('getDescription', ACC_PUBLIC, STRING_TYPE, EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment