Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] How to use the Converter?

Martin Görg wrote:

> Hi,

> I want to convert an
> ...jdt.internal.compiler.ast.AbstractMethodDeclaration to a
> ...jdt.core.dom.MethodDeclaration. I tried to use the ASTConverter
> for this, but failed with a NullPointerException because the source
> is not set. Can someone give me some hints on how to use the
> converter? Or is there another way to achieve my goal?

I forgot to show what I tried so far:

ASTConverter converter = new AjASTConverterFactory().getASTConverter(new HashMap(),  false, null);
converter.setAST(ASTParser.getAST(AST.JLS3));
MethodDeclaration m = (MethodDeclaration) converter.convert(abstractM);




Back to the top