KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 2002-2007 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.parsing.ParseState;
20 import org.springframework.util.StringUtils;
21
22 /**
23  * {@link ParseState} entry representing an aspect.
24  *
25  * @author Mark Fisher
26  * @author Juergen Hoeller
27  * @since 2.0
28  */

29 public class AspectEntry implements ParseState.Entry {
30
31     private final String JavaDoc id;
32
33     private final String JavaDoc ref;
34
35
36     /**
37      * Create a new AspectEntry.
38      * @param id the id of the aspect element
39      * @param ref the bean name referenced by this aspect element
40      */

41     public AspectEntry(String JavaDoc id, String JavaDoc ref) {
42         this.id = id;
43         this.ref = ref;
44     }
45
46     public String JavaDoc toString() {
47         return "Aspect: " + (StringUtils.hasLength(this.id) ? "id='" + this.id + "'" : "ref='" + this.ref + "'");
48     }
49
50 }
51
Popular Tags