[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-dev] AspectJ, privileged, and superclasses
|
Hi,
It's been some days that i can't find a way to make my Aspect code
working.
Here are my classes :
public class InternalCartoParser extends AbstractInternalAntlrParser {
private GrammarAccess myGrammar;
public final EObject ruleLigneSdt() throws RecognitionException {
EObject current = null;
setCurrentLookahead();
resetLookahead();
return current; // Just as an example
}
}
The Methods setCurrentLookahead(), resetLookahead are from the superclass
AbstractInternalAntlrParser.
Here is my AspectJ class put in the same java aspect project :
privileged aspect InternalParser {
declare parents: InternalCartoParser extends
AbstractInternalAntlrParser;
pointcut ruleLigneSdt(InternalCartoParser c):
execution(EObject
org.xtext.example.parser.antlr.internal.InternalCartoParser.ruleLigneSdt())
&& target(c) ;
EObject around(InternalCartoParser c): ruleLigneSdt(c) {
System.out.prinln("Start of Aspect class");
CartoGrammarAccess grammarAccessLocal = c.grammarAccess; //
I succeed because of privileged aspect
EObject current = new EObject();
setCurrentLookahead(); // WARNING
resetLookahead(); // WARNING
System.out.prinln("End of Aspect class");
return current;
}
}
I've got the warning message on my setCurrenLookahead ligne : "this
affected type is not exposed to the weaver:
org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser (needed for
privileged access) [Xlint:typeNotExposedToWeaver]"
I don't know how to use super methods of my class InternalCartoparser into
my Aspect..
Thank you for your help
Antoine Laffond (Paris - France)