Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to use @Pointcut("") Syntax ?

this can only be used for abstract pointcut and is only supported
starting with last dev. build.
the method hosting the @Pointcut for an abstract pointcut must be... abstract.

Alex

On 10/31/05, mohan.radhakrishnan@xxxxxxxxxxxxx
<mohan.radhakrishnan@xxxxxxxxxxxxx> wrote:
> Hi,
>
>       Why does eclipse show errors in this syntax ?
>
>
>  @Pointcut("")
>     void method(){};
>
>  @Before("method()")
>  public void test() {
>  }
>
>
> The AspectJ5 notebook also has this syntax.
>
> @Pointcut("")
>      protected abstract void anyCall();
> --------------------------------------------------------------------------------------------------
> The following syntax throws an exception
>
> @Pointcut
>     void method(){};
>
>  @Before("method()")
>  public void test() {
>  }
>
> java.lang.NullPointerException
> at
> org.aspectj.weaver.patterns.BasicTokenSource.makeTokenSource(BasicTokenSource.java:84)
> at
> org.aspectj.weaver.patterns.PatternParser.<init>(PatternParser.java:1373)
> at
> org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.convertToPointcutDeclaration(ValidateAtAspectJAnnotationsVisitor.java:493)
> at
> org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.visit(ValidateAtAspectJAnnotationsVisitor.java:188)
> at
> org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:185)
> at
> org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1183)
> at
> org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:339)
> at
> org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.beforeAnalysing(AjCompilerAdapter.java:154)
> at
> org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$before$org_aspectj_ajdt_internal_compiler_CompilerAdapter$7$db78446d(CompilerAdapter.aj:101)
> at
> org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:517)
> at
> org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
> at
> org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:759)
> at
> org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:249)
> at
> org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:158)
> at
> org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
> at
> org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)
>
> NullPointerException thrown: null
>
>
> Thanks,
> Mohan
>
>
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>


Back to the top