Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

public class Main {
    private static Field getSingletonField(Class<?> hostClas) {
        Field f = null;
        try {
            f = hostClas.getDeclaredField("I");
            if (!Modifier.isStatic(f.getModifiers()))
                throw new Exception("'I' field should be static." + f);
            f.setAccessible(true);
        } catch (Throwable ex) {
        }
        return f;
    }
}