Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Hello Every One, I have questions about how to build the AspectJ AST and make an own visitor to traverse it

Hello everyone:
 
                       I have successfully doing the same kind job in plain java class, I using the CompilationUnitDeclaration as the root node of the AST, and I have extract the parser from the AJDT. And I write my own visitor extends the ASTVisitor to make the traverse, it works well. But when it turns to AspectJ, the problems come. First I don't know which root node I should use, the CompilationUnitDeclaration is also work, but I have seen other root nodes, and The AspectDeclaration is extends the TypeDeclaration, AdviceDeclaration, PointcutDeclaration and InterTypeDeclaration are also extends the AjMethodDeclaration, so it also work while using the former visitor, but there are new information in these AspectjNode, such as the PointcutDesignator, in the PointcutDeclaration and AdviceDeclaration. The AdviceType in the AdviceDeclaration, some of them even didn't extends the ASTNode, it means I can not using the visitor to visit it, so,  I want to someone to help me. I conclude the problems above again, if now I only know the **.aj file, and I want to make an ASTs, and I want to make an own visitor, how can I do. 
 
Thank you for reading my mail and may you all a happy day~~
 
Waiting for your reply.
 
Sincerely
 
Zhong Xian ,Gu

Back to the top