@Override public Object[] resolveFunctionArguments(FunctionContext functionContext) { Object[] args = super.resolveFunctionArguments(functionContext); if (functionContext instanceof RegionFunctionContext) { if (this.regionParameterPosition >= 0) { args = ArrayUtils.insert(args, regionParameterPosition, getRegionForContext( (RegionFunctionContext) functionContext)); } if (this.filterParameterPosition >= 0) { args = ArrayUtils.insert(args, filterParameterPosition, ((RegionFunctionContext) functionContext).getFilter()); } } if (this.functionContextParameterPosition >= 0) { args = ArrayUtils.insert(args, functionContextParameterPosition, functionContext); } if (this.resultSenderParameterPosition >= 0) { args = ArrayUtils.insert(args, resultSenderParameterPosition, functionContext.getResultSender()); } Assert.isTrue(args.length == this.method.getParameterTypes().length, String.format("Wrong number of arguments for method [%s]; Expected [%d], but was [%d]", this.method.getName(), this.method.getParameterTypes().length, args.length)); return args; }
@Override public Object[] resolveFunctionArguments(FunctionContext functionContext) { Object[] args = super.resolveFunctionArguments(functionContext); if (functionContext instanceof RegionFunctionContext) { if (this.regionParameterPosition >= 0) { args = ArrayUtils.insert(args, regionParameterPosition, getRegionForContext( (RegionFunctionContext) functionContext)); } if (this.filterParameterPosition >= 0) { args = ArrayUtils.insert(args, filterParameterPosition, ((RegionFunctionContext) functionContext).getFilter()); } } if (this.functionContextParameterPosition >= 0) { args = ArrayUtils.insert(args, functionContextParameterPosition, functionContext); } if (this.resultSenderParameterPosition >= 0) { args = ArrayUtils.insert(args, resultSenderParameterPosition, functionContext.getResultSender()); } Assert.isTrue(args.length == this.method.getParameterTypes().length, String.format("Wrong number of arguments for method [%s]; Expected [%d], but was [%d]", this.method.getName(), this.method.getParameterTypes().length, args.length)); return args; }
/** * Adds the PDX Disk Store bean name as a dependency at the beginning of the list of dependencies declared * by the Bean. * * @param beanDefinition the BeanDefinition to add the PDX Disk Store dependency to. * @see #getDependsOn(org.springframework.beans.factory.config.BeanDefinition) * @see org.springframework.beans.factory.config.BeanDefinition#setDependsOn(String[]) */ private void addPdxDiskStoreDependency(BeanDefinition beanDefinition) { String[] newDependsOn = (String[]) ArrayUtils.insert(getDependsOn(beanDefinition), 0, getPdxDiskStoreName()); beanDefinition.setDependsOn(newDependsOn); }
/** * Adds the PDX Disk Store bean name as a dependency at the beginning of the list of dependencies declared * by the Bean. * * @param beanDefinition the BeanDefinition to add the PDX Disk Store dependency to. * @see #getDependsOn(org.springframework.beans.factory.config.BeanDefinition) * @see org.springframework.beans.factory.config.BeanDefinition#setDependsOn(String[]) */ private void addPdxDiskStoreDependency(BeanDefinition beanDefinition) { String[] newDependsOn = (String[]) ArrayUtils.insert(getDependsOn(beanDefinition), 0, getPdxDiskStoreName()); beanDefinition.setDependsOn(newDependsOn); }