The MyComponent was merely to represent the type you want to get injected.
If it is the aspect then it would be the aspect type:

before(MyAspect obj): execution(MyAspect.new(..)) && this(obj) {
   obj.businessRuleManager = BusinessRuleAspect.aspectOf();
}

"when you see the aspect initializing, set this field within it"

Andy



On 7 May 2014 00:27, erik <evandeve...@fugro.be> wrote:

> Thanks for the answer, Andy. I just posted the same question on
> stackoverflow. I'm a bit confused about the extra 'MyComponent' in your
> response. In my case I only have two components: the BusinessRuleAspect,
> and
> a businessRuleManager. I want to inject (or just set) the manager instance
> into the Aspect, without relying on the spring framework to do that for me.
>
>
>
> --
> View this message in context:
> http://aspectj.2085585.n4.nabble.com/Injecting-a-component-in-a-non-spring-environment-tp4651384p4651386.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to