Example usage for org.springframework.beans.factory.config ConstructorArgumentValues getArgumentValue

List of usage examples for org.springframework.beans.factory.config ConstructorArgumentValues getArgumentValue

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config ConstructorArgumentValues getArgumentValue.

Prototype

@Nullable
public ValueHolder getArgumentValue(int index, Class<?> requiredType) 

Source Link

Document

Look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type.

Usage

From source file:org.springmodules.cache.config.ConfigAssert.java

public static void assertBeanDefinitionHasConstructorArgument(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());
}