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.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 id;
32:
33: private final String ref;
34:
35: /**
36: * Create a new AspectEntry.
37: * @param id the id of the aspect element
38: * @param ref the bean name referenced by this aspect element
39: */
40: public AspectEntry(String id, String ref) {
41: this .id = id;
42: this .ref = ref;
43: }
44:
45: public String toString() {
46: return "Aspect: "
47: + (StringUtils.hasLength(this .id) ? "id='" + this .id
48: + "'" : "ref='" + this .ref + "'");
49: }
50:
51: }
|