Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.database.Cursor;
import java.lang.reflect.Field;

public class Main {
    public static void keep_setShort(Field field, Object obj, Cursor cursor, int i) {
        try {
            if (field.getType().equals(Short.TYPE))
                field.setShort(obj, cursor.getShort(i));
            else
                field.set(obj, Short.valueOf(cursor.getShort(i)));
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }
}