class CacheBase implements ApplicationContextAware, InitializingBean {

    @SuppressWarnings("unchecked")
    public <T> T getUpdateData(final AnnotationData data, final Method method, final Object[] args, final Object returnValue)
            throws Exception {
        return data.isReturnDataIndex() ? (T) returnValue : (T) Utils.getMethodArg(data.getDataIndex(), args, method.toString());
    }

}