Spring Framework ConstructorArgumentValues - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ConstructorArgumentValues class.

This code example shows how to use the following methods:addIndexedArgumentValue
 
		return beanDef;
	} 
 
	private RootBeanDefinition getRedirectView(Element element, HttpStatus status, Object source) {
		ConstructorArgumentValues cavs = new ConstructorArgumentValues();
		cavs.addIndexedArgumentValue(0, element.getAttribute("redirect-url"));
		RootBeanDefinition redirectView = new RootBeanDefinition(RedirectView.class, cavs, null);
		redirectView.setSource(source);
		if (status != null) {
			redirectView.getPropertyValues().add("statusCode", status);
		} 
		if (element.hasAttribute("context-relative")) {
			redirectView.getPropertyValues().add("contextRelative", element.getAttribute("context-relative"));
		} 
		if (element.hasAttribute("keep-query-params")) {
			redirectView.getPropertyValues().add("propagateQueryParams", element.getAttribute("keep-query-params"));
		} 
		return redirectView;
	} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:addGenericArgumentValue
This code example shows how to use the following methods:addIndexedArgumentValue
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:getArgumentValue
      Object expectedArgument, ConstructorArgumentValues argumentValues,
      int index, Class argumentType) {
 
    String message = "<Constructor argument with index [" + index + "]";
 
    ValueHolder argumentValue = argumentValues.getArgumentValue(index,
        argumentType);
 
    assertEquals(message, expectedArgument, argumentValue.getValue());
  } 
 
  /** 
   * Asserts that the given bean definition contains a property value equal to 
   * the given one. 
   *  
   * @param beanDefinition 
   *          the given bean definition 
   * @param expectedPropertyValue 
   *          the expected property value 
   */ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:addGenericArgumentValue
See Code Examples for Spring Framework ConstructorArgumentValues Methods: