KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.lang.reflect.Method JavaDoc;
20
21 /**
22  * A specialized type of MethodMatcher that takes into account introductions when
23  * matching methods. If there are no introductions on the target class, a method
24  * matcher may be able to optimize matching more effectively for example.
25  *
26  * @author Adrian Colyer
27  * @since 2.0
28  */

29 public interface IntroductionAwareMethodMatcher extends MethodMatcher {
30
31     /**
32      * Perform static checking whether the given method matches. This may be invoked
33      * instead of the 2-arg {@link #matches(java.lang.reflect.Method, Class)} method
34      * if the caller supports the extended IntroductionAwareMethodMatcher interface.
35      * @param method the candidate method
36      * @param targetClass the target class (may be <code>null</code>, in which case
37      * the candidate class must be taken to be the method's declaring class)
38      * @param hasIntroductions <code>true</code> if the object on whose behalf we are
39      * asking is the subject on one or more introductions; <code>false</code> otherwise
40      * @return whether or not this method matches statically
41      */

42     boolean matches(Method JavaDoc method, Class JavaDoc targetClass, boolean hasIntroductions);
43
44 }
45
Popular Tags