KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > aop > dynaop > InterfacesComponentAspect


1 /*****************************************************************************
2  * Copyright (c) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  * Idea by Rachel Davies, Original code by various *
9  *****************************************************************************/

10 package org.nanocontainer.aop.dynaop;
11
12 import dynaop.Aspects;
13 import dynaop.Pointcuts;
14 import org.nanocontainer.aop.ComponentPointcut;
15
16 /**
17  * Aspect that addes interfaces to a component.
18  *
19  * @author Stephen Molitor
20  * @version $Revision: 3144 $
21  */

22 class InterfacesComponentAspect extends ComponentAspect {
23
24     private final Class JavaDoc[] interfaces;
25
26     InterfacesComponentAspect(ComponentPointcut componentPointcut, Class JavaDoc[] interfaces) {
27         super(componentPointcut);
28         this.interfaces = interfaces;
29     }
30
31     void doRegisterAspect(Object JavaDoc componentKey, Aspects aspects) {
32         aspects.interfaces(Pointcuts.ALL_CLASSES, interfaces);
33     }
34
35 }
Popular Tags