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;

import android.util.Log;

public class Main {
    private static final String TAG = "clsutils";

    static public boolean printAllInform(Class clsShow) {
        try {
            Method[] methods = clsShow.getMethods();
            int i = 0;
            for (; i < methods.length; i++) {
                Log.e(TAG, methods[i].getName() + ";and the i is:" + i);
            }
            Field[] allFields = clsShow.getFields();
            for (i = 0; i < allFields.length; i++) {
                Log.e(TAG, allFields[i].getName());
            }
        } catch (Exception e) {
            // TODO: handle exception
            return false;
        }
        return true;
    }
}