public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker implements RunnableSE, BeanClassLoaderAware, InitializingBean
RunnableSE インターフェースを実装するアダプター。MethodInvoker から共通の構成プロパティを継承します。
Executor.execute(Runnable)SE| コンストラクターと説明 |
|---|
MethodInvokingRunnable() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() |
protected StringSE | getInvocationFailureMessage() 呼び出し失敗の例外のメッセージを作成します。 |
protected ClassSE<?> | resolveClassName(StringSE className) 指定されたクラス名をクラスに解決します。 |
void | run() |
void | setBeanClassLoader(ClassLoaderSE classLoader)Bean class loaderSE を Bean インスタンスに提供するコールバック。 |
doFindMatchingMethod, findMatchingMethod, getDefaultTypeConverter, getTypeConverter, registerCustomEditor, setTypeConvertergetArguments, getPreparedMethod, getTargetClass, getTargetMethod, getTargetObject, getTypeDifferenceWeight, invoke, isPrepared, prepare, setArguments, setStaticMethod, setTargetClass, setTargetMethod, setTargetObjectcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEprotected final Log logger
public void setBeanClassLoader(ClassLoaderSE classLoader)
BeanClassLoaderAwareclass loaderSE を Bean インスタンスに提供するコールバック。 通常の Bean プロパティの設定後、ただし InitializingBean's InitializingBean.afterPropertiesSet() メソッドやカスタム init-method などの初期化コールバックの前に呼び出されます。
BeanClassLoaderAware の setBeanClassLoader classLoader - 所有クラスローダー。null の場合もありますが、その場合はデフォルトの ClassLoader を使用する必要があります。たとえば、ClassUtils.getDefaultClassLoader() 経由で取得した ClassLoader などです。protected ClassSE<?> resolveClassName(StringSE className) throws ClassNotFoundExceptionSE
MethodInvoker デフォルトの実装では、スレッドコンテキストクラスローダーを使用して ClassUtils.forName を使用します。
MethodInvoker の resolveClassName className - 解決するクラス名 ClassNotFoundExceptionSE - クラス名が無効だった場合 public void afterPropertiesSet()
throws ClassNotFoundExceptionSE,
NoSuchMethodExceptionSEInitializingBeanBeanFactoryAware、ApplicationContextAware などを満たした後、包含 BeanFactory によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean の afterPropertiesSet ClassNotFoundExceptionSENoSuchMethodExceptionSEpublic void run()
RunnableSE の runSE protected StringSE getInvocationFailureMessage()