KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > aop > DynamicIntroductionAdvice


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.aop;
18
19 import org.aopalliance.aop.Advice;
20
21 /**
22  * Subinterface of AOP Alliance Advice that allows additional interfaces
23  * to be implemented by an Advice, and available via a proxy using that
24  * interceptor. This is a fundamental AOP concept called <b>introduction</b>.
25  *
26  * <p>Introductions are often <b>mixins</b>, enabling the building of composite
27  * objects that can achieve many of the goals of multiple inheritance in Java.
28  *
29  * <p>Compared to {qlink IntroductionInfo}, this interface allows an advice to
30  * implement a range of interfaces that is not necessarily known in advance.
31  * Thus an {@link IntroductionAdvisor} can be used to specify which interfaces
32  * will be exposed in an advised object.
33  *
34  * @author Rod Johnson
35  * @since 1.1.1
36  * @see IntroductionInfo
37  * @see IntroductionAdvisor
38  */

39 public interface DynamicIntroductionAdvice extends Advice {
40     
41     /**
42      * Does this introduction advice implement the given interface?
43      * @param intf the interface to check
44      * @return whether the advice implements the specified interface
45      */

46     boolean implementsInterface(Class JavaDoc intf);
47
48 }
49
Popular Tags