KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > aop > config > AspectComponentDefinition


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.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  * implementation 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 CompositeComponentDefinition {
34
35     private final BeanDefinition[] beanDefinitions;
36
37     private final BeanReference[] beanReferences;
38
39
40     public AspectComponentDefinition(
41             String JavaDoc aspectName, BeanDefinition[] beanDefinitions, BeanReference[] beanReferences, Object JavaDoc source) {
42
43         super(aspectName, source);
44         this.beanDefinitions = (beanDefinitions != null ? beanDefinitions : new BeanDefinition[0]);
45         this.beanReferences = (beanReferences != null ? beanReferences : new BeanReference[0]);
46     }
47
48     public BeanDefinition[] getBeanDefinitions() {
49         return this.beanDefinitions;
50     }
51
52     public BeanReference[] getBeanReferences() {
53         return this.beanReferences;
54     }
55
56 }
57
Popular Tags