Example usage for org.apache.commons.lang3.reflect FieldUtils getDeclaredField

List of usage examples for org.apache.commons.lang3.reflect FieldUtils getDeclaredField

Introduction

In this page you can find the example usage for org.apache.commons.lang3.reflect FieldUtils getDeclaredField.

Prototype

public static Field getDeclaredField(final Class<?> cls, final String fieldName) 

Source Link

Document

Gets an accessible Field by name respecting scope.

Usage

From source file:com.adobe.acs.commons.util.impl.ReflectionUtilTest.java

@Test
public void test_isAssignableFrom() {

    Field numberField = FieldUtils.getDeclaredField(ReflectionUtilTest.class, "numberField");
    boolean isAssignableFrom = isAssignableFrom(numberField.getGenericType(), Integer.class);
    assertTrue(isAssignableFrom);//from  w  w  w .  j a  va 2  s. co  m
}