ここではuContainer
、別のプロジェクトからオブジェクトを取得しようとしています。から設定された戻り値を持つすべてのセッターとゲッターを持つuContainer properties file
。特定のユーザーのユーザープロパティのように。uContainerインスタンスから特定のメソッド値を取得するために使用しています。しかし、4行目で、アプリケーションがクラッシュしました。
uContainerは、UserContainerクラスのインスタンスです。
getSingleResultListing
UserContainer
また、 getterメソッドとsetterメソッドを持つクラスのブール変数。
コードを以下に示します。
Method getUContainer = form.getClass().getMethod("getUserContainer", new Class[0]);
Object uContainerObj = (Object)getUContainer.invoke(form, new Object[0]);
Method getFlagValueMethod = uContainerObj.getClass().getMethod("getSingleResultListing", new Class[0]);
String flagValue = (String)getFlagValueMethod.invoke(uContainerObj, new Object[0]);
log.info(">>>flagValue: "+flagValue);
boolean singleListingFlag = Boolean.getBoolean(flagValue);
log.info(">>>singleListingFlag: "+singleListingFlag);
ここで、uContainerオブジェクトを呼び出しているときの4行目で、エラーが発生しています。
ありがとう..