|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.framework.ProxyConfig org.springframework.aop.framework.AdvisedSupport org.springframework.aop.framework.ProxyCreatorSupport org.springframework.aop.aspectj.annotation.AspectJProxyFactory
public class AspectJProxyFactory
AspectJ-based proxy factory, allowing for programmatic building of proxies which include AspectJ aspects (code style as well Java 5 annotation style).
addAspect(Object)
,
addAspect(Class)
,
getProxy()
,
getProxy(ClassLoader)
,
ProxyFactory
,
Serialized FormField Summary |
---|
Fields inherited from class org.springframework.aop.framework.AdvisedSupport |
---|
EMPTY_TARGET_SOURCE |
Constructor Summary | |
---|---|
AspectJProxyFactory()
Create a new AspectJProxyFactory. |
|
AspectJProxyFactory(Class[] interfaces)
Create a new AspectJProxyFactory . |
|
AspectJProxyFactory(Object target)
Create a new AspectJProxyFactory. |
Method Summary | ||
---|---|---|
void |
addAspect(Class aspectClass)
Add an aspect of the supplied type to the end of the advice chain. |
|
void |
addAspect(Object aspectInstance)
Add the supplied aspect instance to the chain. |
|
|
getProxy()
Create a new proxy according to the settings in this factory. |
|
|
getProxy(ClassLoader classLoader)
Create a new proxy according to the settings in this factory. |
Methods inherited from class org.springframework.aop.framework.ProxyCreatorSupport |
---|
addListener, adviceChanged, createAopProxy, getAopProxyFactory, isActive, removeListener, setAopProxyFactory |
Methods inherited from class org.springframework.aop.framework.ProxyConfig |
---|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.aop.framework.Advised |
---|
isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy |
Constructor Detail |
---|
public AspectJProxyFactory()
public AspectJProxyFactory(Object target)
Will proxy all interfaces that the given target implements.
target
- the target object to be proxiedpublic AspectJProxyFactory(Class[] interfaces)
AspectJProxyFactory
.
No target, only interfaces. Must add interceptors.
Method Detail |
---|
public void addAspect(Object aspectInstance)
aspectInstance
- the AspectJ aspect instancepublic void addAspect(Class aspectClass)
aspectClass
- the AspectJ aspect classpublic <T> T getProxy()
Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.
Uses a default class loader: Usually, the thread context class loader (if necessary for proxy creation).
public <T> T getProxy(ClassLoader classLoader)
Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.
Uses the given class loader (if necessary for proxy creation).
classLoader
- the class loader to create the proxy with
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |