Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Purpose

The transfomartion AST only will be visited if the annotation "logger" exist on the method. Eg:

The "Logger" annotation has the following configuration:

@GroovyASTTransformationClass(['AstDemo'])

So, if the annotation "Logger" is found, the transformation AST will be invoking(visited) the target unit. This proccess occurs on compile phase, when adding compile(project(':ast') in dependencies build gradle(or any build managment).

In the class HelloAst, we see that the method with Logger annotation will print out Starting method method_name when starting and Ending method method_name when it terminates.

See more in ast module(directory), where are all the abstract transformation implementations.

Run

gradle clean && \
gradle build && \
gradle run

output:

Starting method saySomething
Hello Ast(Abstract syntax tree)
Ending method saySomething

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages