Example usage for org.springframework.util ClassUtils getStaticMethod

List of usage examples for org.springframework.util ClassUtils getStaticMethod

Introduction

In this page you can find the example usage for org.springframework.util ClassUtils getStaticMethod.

Prototype

@Nullable
public static Method getStaticMethod(Class<?> clazz, String methodName, Class<?>... args) 

Source Link

Document

Return a public static method of a class.

Usage

From source file:org.springframework.integration.configuration.EnableIntegrationTests.java

@Test
public void testIntegrationEvaluationContextCustomization() {
    EvaluationContext evaluationContext = this.context.getBean(EvaluationContext.class);
    List<?> propertyAccessors = TestUtils.getPropertyValue(evaluationContext, "propertyAccessors", List.class);
    assertThat(propertyAccessors.get(0), instanceOf(JsonPropertyAccessor.class));
    Map<?, ?> variables = TestUtils.getPropertyValue(evaluationContext, "variables", Map.class);
    Object testSpelFunction = variables.get("testSpelFunction");
    assertEquals(ClassUtils.getStaticMethod(TestSpelFunction.class, "bar", Object.class), testSpelFunction);
}