01: /*
02: * Copyright 2002-2007 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.config;
18:
19: import org.springframework.beans.factory.config.BeanDefinition;
20: import org.springframework.beans.factory.config.BeanReference;
21: import org.springframework.beans.factory.parsing.CompositeComponentDefinition;
22:
23: /**
24: * {@link org.springframework.beans.factory.parsing.ComponentDefinition}
25: * that holds an aspect definition, including its nested pointcuts.
26: *
27: * @author Rob Harrop
28: * @author Juergen Hoeller
29: * @since 2.0
30: * @see #getNestedComponents()
31: * @see PointcutComponentDefinition
32: */
33: public class AspectComponentDefinition extends
34: CompositeComponentDefinition {
35:
36: private final BeanDefinition[] beanDefinitions;
37:
38: private final BeanReference[] beanReferences;
39:
40: public AspectComponentDefinition(String aspectName,
41: BeanDefinition[] beanDefinitions,
42: BeanReference[] beanReferences, Object source) {
43:
44: super (aspectName, source);
45: this .beanDefinitions = (beanDefinitions != null ? beanDefinitions
46: : new BeanDefinition[0]);
47: this .beanReferences = (beanReferences != null ? beanReferences
48: : new BeanReference[0]);
49: }
50:
51: public BeanDefinition[] getBeanDefinitions() {
52: return this .beanDefinitions;
53: }
54:
55: public BeanReference[] getBeanReferences() {
56: return this.beanReferences;
57: }
58:
59: }
|