KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > aop > framework > autoproxy > NeverMatchAdvisor


1 /*
2  * Copyright 2002-2005 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.framework.autoproxy;
18
19 import java.lang.reflect.Method JavaDoc;
20 import java.util.List JavaDoc;
21
22 import org.springframework.aop.interceptor.NopInterceptor;
23 import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
24
25 /**
26  *
27  * @author Rod Johnson
28  */

29 public class NeverMatchAdvisor extends StaticMethodMatcherPointcutAdvisor {
30     
31     public NeverMatchAdvisor() {
32         super(new NopInterceptor());
33     }
34     
35     /**
36      * This method is solely to allow us to create a mixture of dependencies in
37      * the bean definitions. The dependencies don't have any meaning, and don't
38      * <b>do</b> anything.
39      */

40     public void setDependencies(List JavaDoc l) {
41         
42     }
43
44     /**
45      * @see org.springframework.aop.MethodMatcher#matches(java.lang.reflect.Method, java.lang.Class)
46      */

47     public boolean matches(Method JavaDoc m, Class JavaDoc targetClass) {
48         //System.err.println("NeverMAtch test");
49
return false;
50     }
51
52 }
53
Popular Tags