Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ Unit Testing

Hi Manuel,
I'm relatively new to AOP and AspectJ, but IIRC it's possible to
instantiate an aspect using AspectClass.asAspect(). ICRR if this is
possible only for aspects declared as not singleton, of if also when an
aspect is a singleton (the default case) this static method will return
the default instance (but I think this is the case).

Using it you should not need to pollute your aspect with public static
stuff only for testing.

hi, good to know.
will refactor my aspect to common instance dependency injection and will remove the protected static accesses.

manuel aldana

Back to the top