Java Reflection Field Find findField(String fieldName, ArrayList fields)

Here you can find the source of findField(String fieldName, ArrayList fields)

Description

find Field

License

Open Source License

Declaration

public static Field findField(String fieldName, ArrayList<Field> fields) 

Method Source Code

//package com.java2s;

import java.lang.reflect.Field;

import java.util.ArrayList;

public class Main {
    public static Field findField(String fieldName, ArrayList<Field> fields) {
        for (Field field : fields) {
            if (field.getName().equals(fieldName)) {
                return field;
            }//from  w w  w  .  j  av  a2 s  . co  m
        }
        return null;
    }
}

Related

  1. findField(Object object, String fieldName)
  2. findField(Object object, String name, Class klass)
  3. findField(Object propertyId, Class classOfItem)
  4. findField(Object target, Class type)
  5. findField(Object target, String fieldName)
  6. findField(String fieldName, Class cl)
  7. findField(String fieldName, Class type)
  8. findField(String name, Class c)
  9. findField(String name, Object o)