Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**
     * Get {@link AssetManager} using reflection
     */
    private static Object getAssetManager() {
        Class assetManagerClass = null;
        try {
            assetManagerClass = Class.forName("android.content.res.AssetManager");
            return assetManagerClass.newInstance();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        return null;
    }
}