Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.lang.reflect.Field;

import android.text.TextUtils;

public class Main {

    public static boolean isFiledWithName(Field field, String fieldName) {
        if (field == null || TextUtils.isEmpty(fieldName)) {
            throw new IllegalArgumentException("params is illegal");
        }
        if (fieldName.equals(field.getName())) {
            return true;
        }
        return false;
    }
}