1 /* 2 * Copyright 2002-2013 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.context.annotation; 18 19 /** 20 * Enumerates the various scoped-proxy options. 21 * 22 * <p>For a more complete discussion of exactly what a scoped proxy is, see the 23 * section of the Spring reference documentation entitled '<em>Scoped beans as 24 * dependencies</em>'. 25 * 26 * @author Mark Fisher 27 * @since 2.5 28 * @see ScopeMetadata 29 */ 30 public enum ScopedProxyMode { 31 32 /** 33 * Default typically equals {@link #NO}, unless a different default 34 * has been configured at the component-scan instruction level. 35 */ 36 DEFAULT, 37 38 /** 39 * Do not create a scoped proxy. 40 * <p>This proxy-mode is not typically useful when used with a 41 * non-singleton scoped instance, which should favor the use of the 42 * {@link #INTERFACES} or {@link #TARGET_CLASS} proxy-modes instead if it 43 * is to be used as a dependency. 44 */ 45 NO, 46 47 /** 48 * Create a JDK dynamic proxy implementing <i>all</i> interfaces exposed by 49 * the class of the target object. 50 */ 51 INTERFACES, 52 53 /** 54 * Create a class-based proxy (uses CGLIB). 55 */ 56 TARGET_CLASS; 57 58 }