次のように、オブジェクトをインスタンス化するための一般的な方法があります。
@Override
public <T> T createRawObject(Class<?> raw_type,
                             ProviderParam param)
{
    SpringProviderParam spring_param = (SpringProviderParam) param;
    ApplicationContext ctx = SpringContextGenericProvider.getInstance()
                                                         .generate(param,
                                                                   ApplicationContext.class,
                                                                   (Object[]) spring_param.getContextPaths());
    ValidateUtility.notNull(ctx, "Target Application_Context is null");
    T raw_object=  (T) ctx.getBean((spring_param.getBeanName()!=null)?spring_param.getBeanName():raw_type);
    ValidateUtility.sameType(raw_object, raw_type, "Target object isn't instance of a {} class", raw_type);
    return raw_object;
}
私の問題は次の行にあります:
    T raw_object=  (T) ctx.getBean((spring_param.getBeanName()!=null)?spring_param.getBeanName():raw_type);
この行はコンパイルされず、次のコンパイル エラーが表示されます。
The method getBean(String) in the type BeanFactory is not applicable for the arguments (Serializable)
しかし、この行を次の行に変更し、正常にコンパイルすると:
T raw_object=  null;
if(spring_param.getBeanName()!=null)
    raw_object=  (T) ctx.getBean(spring_param.getBeanName());
else
    raw_object=  (T) ctx.getBean(raw_type);
私はこの問題があいまいです。