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.context.weaving;
18:
19: import org.springframework.instrument.classloading.LoadTimeWeaver;
20:
21: /**
22: * Interface to be implemented by any object that wishes to be notified
23: * of the application context's default {@link LoadTimeWeaver}.
24: *
25: * @author Juergen Hoeller
26: * @since 2.5
27: * @see org.springframework.context.ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME
28: */
29: public interface LoadTimeWeaverAware {
30:
31: /**
32: * Set the {@link LoadTimeWeaver} of this object's containing
33: * {@link org.springframework.context.ApplicationContext ApplicationContext}.
34: * <p>Invoked after the population of normal bean properties but before an
35: * initialization callback like
36: * {@link org.springframework.beans.factory.InitializingBean InitializingBean's}
37: * {@link org.springframework.beans.factory.InitializingBean#afterPropertiesSet() afterPropertiesSet()}
38: * or a custom init-method. Invoked after
39: * {@link org.springframework.context.ApplicationContextAware ApplicationContextAware's}
40: * {@link org.springframework.context.ApplicationContextAware#setApplicationContext setApplicationContext(..)}.
41: * <p><b>NOTE:</b> This method will only be called if there actually is a
42: * <code>LoadTimeWeaver</code> available in the application context. If
43: * there is none, the method will simply not get invoked, assuming that the
44: * implementing object is able to activate its weaving dependency accordingly.
45: * @param loadTimeWeaver the <code>LoadTimeWeaver</code> instance (never <code>null</code>)
46: * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
47: * @see org.springframework.context.ApplicationContextAware#setApplicationContext
48: */
49: void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver);
50:
51: }
|