Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.os.Parcelable;

import java.lang.reflect.Field;

public class Main {
    private static Parcelable.Creator getCreator(Field field) throws IllegalAccessException {
        try {
            return (Parcelable.Creator) field.getType().getDeclaredField("CREATOR").get(null);
        } catch (NoSuchFieldException e) {
            throw new RuntimeException(field.getType() + " is an Parcelable without CREATOR");
        }
    }
}