01: /*
02: * Copyright 2002-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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
29: AbstractGenericPointcutAdvisor {
30:
31: private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
32:
33: public Pointcut getPointcut() {
34: return this .pointcut;
35: }
36:
37: public void setExpression(String expression) {
38: this .pointcut.setExpression(expression);
39: }
40:
41: public void setLocation(String location) {
42: this .pointcut.setLocation(location);
43: }
44:
45: public void setParameterTypes(Class[] types) {
46: this .pointcut.setParameterTypes(types);
47: }
48:
49: public void setParameterNames(String[] names) {
50: this .pointcut.setParameterNames(names);
51: }
52:
53: public String getLocation() {
54: return this .pointcut.getLocation();
55: }
56:
57: public String getExpression() {
58: return this.pointcut.getExpression();
59: }
60:
61: }
|