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 java.lang.reflect.Method;

public class Main {
    public static Method getAppMethod(Class cls, Field field) throws Exception {
        char[] ca = field.getName().toCharArray();
        ca[0] = Character.toUpperCase(ca[0]);
        return cls.getMethod("set" + new String(ca), field.getType());
    }
}