public class ProxyFactory extends ProxyCreatorSupport
EMPTY_TARGET_SOURCE
コンストラクターと説明 |
---|
ProxyFactory() 新しい ProxyFactory を作成します。 |
ProxyFactory(ClassSE<?>... proxyInterfaces) 新しい ProxyFactory を作成します。 |
ProxyFactory(ClassSE<?> proxyInterface, Interceptor interceptor) 指定されたインターフェースおよびインターセプター用に新しい ProxyFactory を作成します。 |
ProxyFactory(ClassSE<?> proxyInterface, TargetSource targetSource) 指定された TargetSource の ProxyFactory を作成し、指定されたインターフェースをプロキシに実装させます。 |
ProxyFactory(ObjectSE target) 新しい ProxyFactory を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
ObjectSE | getProxy() このファクトリの設定に従って新しいプロキシを作成します。 |
static <T> T | getProxy(ClassSE<T> proxyInterface, Interceptor interceptor) 指定されたインターフェースとインターセプターの新しいプロキシを作成します。 |
static <T> T | getProxy(ClassSE<T> proxyInterface, TargetSource targetSource) 指定された TargetSource のプロキシを作成し、指定されたインターフェースを実装します。 |
ObjectSE | getProxy(ClassLoaderSE classLoader) このファクトリの設定に従って新しいプロキシを作成します。 |
static ObjectSE | getProxy(TargetSource targetSource) TargetSource のターゲットクラスを継承する、指定された TargetSource のプロキシを作成します。 |
addListener, adviceChanged, createAopProxy, getAopProxyFactory, isActive, removeListener, setAopProxyFactory
addAdvice, addAdvice, addAdvisor, addAdvisor, addAdvisors, addAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorChainFactory, getAdvisorCount, getAdvisors, getAdvisorsInternal, getInterceptorsAndDynamicInterceptionAdvice, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setAdvisorChainFactory, setInterfaces, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toString
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy
public ProxyFactory()
public ProxyFactory(ObjectSE target)
指定されたターゲットが実装するすべてのインターフェースをプロキシします。
target
- プロキシされるターゲットオブジェクト public ProxyFactory(ClassSE<?>... proxyInterfaces)
ターゲットなし、インターフェースのみ。インターセプターを追加する必要があります。
proxyInterfaces
- プロキシが実装するインターフェース public ProxyFactory(ClassSE<?> proxyInterface, Interceptor interceptor)
リモーティングプロキシの場合のように、インターセプターがターゲットに委譲するのではなく、すべての呼び出し自体を処理すると仮定して、単一インターセプターのプロキシを作成するための便利なメソッド。
proxyInterface
- プロキシが実装するインターフェース interceptor
- プロキシが呼び出すインターセプター public ProxyFactory(ClassSE<?> proxyInterface, TargetSource targetSource)
TargetSource
の ProxyFactory を作成し、指定されたインターフェースをプロキシに実装させます。proxyInterface
- プロキシが実装するインターフェース targetSource
- プロキシが呼び出す TargetSourcepublic ObjectSE getProxy()
繰り返し呼び出すことができます。インターフェースを追加または削除した場合、効果は異なります。インターセプターを追加および削除できます。
デフォルトのクラスローダーを使用します: 通常、スレッドコンテキストクラスローダー(プロキシ作成に必要な場合)。
public ObjectSE getProxy(@Nullable ClassLoaderSE classLoader)
繰り返し呼び出すことができます。インターフェースを追加または削除した場合、効果は異なります。インターセプターを追加および削除できます。
指定されたクラスローダーを使用します(プロキシ作成に必要な場合)。
classLoader
- プロキシを作成するクラスローダー (または、低レベルプロキシ機能のデフォルトの場合は null
)public static <T> T getProxy(ClassSE<T> proxyInterface, Interceptor interceptor)
リモーティングプロキシの場合のように、インターセプターがターゲットに委譲するのではなく、すべての呼び出し自体を処理すると仮定して、単一インターセプターのプロキシを作成するための便利なメソッド。
proxyInterface
- プロキシが実装するインターフェース interceptor
- プロキシが呼び出すインターセプター ProxyFactory(Class, org.aopalliance.intercept.Interceptor)
public static <T> T getProxy(ClassSE<T> proxyInterface, TargetSource targetSource)
TargetSource
のプロキシを作成し、指定されたインターフェースを実装します。proxyInterface
- プロキシが実装するインターフェース targetSource
- プロキシが呼び出す TargetSourceProxyFactory(Class, org.springframework.aop.TargetSource)
public static ObjectSE getProxy(TargetSource targetSource)
TargetSource
のターゲットクラスを継承する、指定された TargetSource
のプロキシを作成します。targetSource
- プロキシが呼び出す TargetSource