01: /*****************************************************************************
02: * Copyright (c) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Idea by Rachel Davies, Original code by various *
09: *****************************************************************************/package org.nanocontainer.aop.dynaop;
10:
11: import dynaop.Aspects;
12: import dynaop.Pointcuts;
13: import org.nanocontainer.aop.ComponentPointcut;
14:
15: /**
16: * Aspect that addes interfaces to a component.
17: *
18: * @author Stephen Molitor
19: * @version $Revision: 3144 $
20: */
21: class InterfacesComponentAspect extends ComponentAspect {
22:
23: private final Class[] interfaces;
24:
25: InterfacesComponentAspect(ComponentPointcut componentPointcut,
26: Class[] interfaces) {
27: super (componentPointcut);
28: this .interfaces = interfaces;
29: }
30:
31: void doRegisterAspect(Object componentKey, Aspects aspects) {
32: aspects.interfaces(Pointcuts.ALL_CLASSES, interfaces);
33: }
34:
35: }
|