[jboss-jira] [JBoss JIRA] Created: (JBAS-5739) Allow the use of "this" in annotated named pointcuts, typedefs etc.

Kabir Khan (JIRA) jira-events at lists.jboss.org
Tue Jul 8 08:35:37 EDT 2008


Allow the use of "this" in annotated named pointcuts, typedefs etc.
-------------------------------------------------------------------

                 Key: JBAS-5739
                 URL: http://jira.jboss.com/jira/browse/JBAS-5739
             Project: JBoss Application Server
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
            Reporter: Kabir Khan
         Assigned To: Stale Pedersen


Currently you have to use the fqn when referencing these things:

package org.jboss.test.microcontainer.annotatedaop;

@Aspect(scope=Scope.PER_VM)
public class SomeAspect
{
   @TypeDef("class(org.jboss.test.microcontainer.annotatedaop.SimplePOJO)")
   Object typedef;

   @PointcutDef("execution(* $typedef{org.jboss.test.microcontainer.annotatedaop.SomeAspect.typedef}->method())")
   Object pointcut;

   @Bind(pointcut="org.jboss.test.microcontainer.annotatedaop.SomeAspect.pointcut")
   public Object advice(MethodInvocation inv) throws Throwable{}
}

it would be better to be able to do:

package org.jboss.test.microcontainer.annotatedaop;

@Aspect(scope=Scope.PER_VM)
public class SomeAspect
{
   @TypeDef("class(org.jboss.test.microcontainer.annotatedaop.SimplePOJO)")
   Object typedef;

   @PointcutDef("execution(* $typedef{this.typedef}->method())")
   Object pointcut;

   @Bind(pointcut="this.pointcut")
   public Object advice(MethodInvocation inv) throws Throwable{}
}

The word "this" is just a suggestion, if we could get rid of it, that would be better. If we need to keep it, we might want to use something more recognisable for string replacement, for exampe "$this$"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list