org.springframework.aop.framework
Class ProxyFactoryBean.PrototypePlaceholderAdvisor
java.lang.Object
org.springframework.aop.framework.ProxyFactoryBean.PrototypePlaceholderAdvisor
- All Implemented Interfaces:
- java.io.Serializable, Advisor
- Enclosing class:
- ProxyFactoryBean
private static class ProxyFactoryBean.PrototypePlaceholderAdvisor
- extends java.lang.Object
- implements Advisor, java.io.Serializable
Used in the interceptor chain where we need to replace a bean with a prototype
on creating a proxy.
Field Summary |
private java.lang.String |
beanName
|
private java.lang.String |
message
|
Method Summary |
Advice |
getAdvice()
Return the advice part of this aspect. |
java.lang.String |
getBeanName()
|
boolean |
isPerInstance()
Return whether this advice is associated with a particular instance
(for example, creating a mixin) or shared with all instances of
the advised class obtained from the same Spring bean factory. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
beanName
private final java.lang.String beanName
message
private final java.lang.String message
ProxyFactoryBean.PrototypePlaceholderAdvisor
public ProxyFactoryBean.PrototypePlaceholderAdvisor(java.lang.String beanName)
getBeanName
public java.lang.String getBeanName()
getAdvice
public Advice getAdvice()
- Description copied from interface:
Advisor
- Return the advice part of this aspect. An advice may be an
interceptor, a before advice, a throws advice, etc.
- Specified by:
getAdvice
in interface Advisor
- Returns:
- the advice that should apply if the pointcut matches
- See Also:
org.aopalliance.intercept.MethodInterceptor
,
BeforeAdvice
,
ThrowsAdvice
,
AfterReturningAdvice
isPerInstance
public boolean isPerInstance()
- Description copied from interface:
Advisor
- Return whether this advice is associated with a particular instance
(for example, creating a mixin) or shared with all instances of
the advised class obtained from the same Spring bean factory.
Note that this method is not currently used by the framework.
Typical Advisor implementations always return true
.
Use singleton/prototype bean definitions or appropriate programmatic
proxy creation to ensure that Advisors have the correct lifecycle model.
- Specified by:
isPerInstance
in interface Advisor
- Returns:
- whether this advice is associated with a particular target instance
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object