KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > aop > aspectj > AspectJExpressionPointcutAdvisor


1 /*
2  * Copyright 2002-2006 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.aspectj;
18
19 import org.springframework.aop.Pointcut;
20 import org.springframework.aop.support.AbstractGenericPointcutAdvisor;
21
22 /**
23  * Spring AOP Advisor that can be used for any AspectJ pointcut expression.
24  *
25  * @author Rob Harrop
26  * @since 2.0
27  */

28 public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdvisor {
29
30     private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
31
32
33     public Pointcut getPointcut() {
34         return this.pointcut;
35     }
36
37     public void setExpression(String JavaDoc expression) {
38         this.pointcut.setExpression(expression);
39     }
40
41     public void setLocation(String JavaDoc location) {
42         this.pointcut.setLocation(location);
43     }
44
45     public void setParameterTypes(Class JavaDoc[] types) {
46         this.pointcut.setParameterTypes(types);
47     }
48
49     public void setParameterNames(String JavaDoc[] names) {
50         this.pointcut.setParameterNames(names);
51     }
52
53     public String JavaDoc getLocation() {
54         return this.pointcut.getLocation();
55     }
56
57     public String JavaDoc getExpression() {
58         return this.pointcut.getExpression();
59     }
60
61 }
62
Popular Tags