[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] OnType Variables For Inter-Type Declarations

Is it possible to use variables or wildcards in the OnType expression
in an inter-type declaration?

    Modifiers Type OnType . Id [ = Expression ] ;

The desire is to add a member to whichever class or classes the aspect
is applied to.  All the examples I could find, however, explicitly
name the OnType.  Perhaps this can be done in combination with
pertypewithin as in the example below?

    public aspect InstanceTracking pertypewithin(org.xyz..*) {
        public static final String getWithinTypeName().typeName =
getWithinTypeName();
    }

Cheers!


Jared