Skip to content
Discussion options

You must be logged in to vote

Your code works for me for simple examples. Can you provide a code example that exhibits the problem?

One thing to watch out for: toString is abbreviated for AST nodes that would naturally consume more than 20 characters, so e.g. @RequireRole("Looooong") might turn into "@Requir ... ooong)". If that's the problem, you may need to use getADecorator().getExpression().(InvokeExpr).getCalleeName() or similar (depending on the exact nature of the decorator) to extract the decorator's full function name.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Giardi77
Comment options

Answer selected by Giardi77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants