<commit_before>/**
 * Appcelerator Titanium Mobile
 * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
 * Licensed under the terms of the Apache Public License
 * Please see the LICENSE included with this distribution for details.
 */
package ti.modules.titanium.database;

import java.lang.reflect.Method;
import java.util.HashMap;

import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.util.Log;
import org.appcelerator.titanium.util.TiConfig;

import android.database.AbstractWindowedCursor;
import android.database.Cursor;

@Kroll.proxy
public class TiResultSetProxy extends KrollProxy
{
	private static final String LCAT = "TiResultSet";
	private static final boolean DBG = TiConfig.LOGD;
	
	private static Method isFloat;
	private static Method isLong;
	private static Method isNull;
	private static Class  args[];
	{
		args = new Class[1];
		args[0] = Integer.TYPE;
		
		try {
			isFloat = AbstractWindowedCursor.class.getMethod("isFloat", args);
			isLong  = AbstractWindowedCursor.class.getMethod("isLong",  args);
			isNull  = AbstractWindowedCursor.class.getMethod("isNull",  args);
		} catch (Exception e) {
			isFloat = null;
			isLong  = null;
			isNull  = null;
		}
	}

	protected Cursor rs;
	protected String lastException;
	protected HashMap<String, Integer> columnNames; // workaround case-sensitive matching in Google's implementation

	public TiResultSetProxy(TiContext tiContext, Cursor rs)<commit_msg>make reflection initializer static<commit_after>/**
 * Appcelerator Titanium Mobile
 * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
 * Licensed under the terms of the Apache Public License
 * Please see the LICENSE included with this distribution for details.
 */
package ti.modules.titanium.database;

import java.lang.reflect.Method;
import java.util.HashMap;

import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.util.Log;
import org.appcelerator.titanium.util.TiConfig;

import android.database.AbstractWindowedCursor;
import android.database.Cursor;

@Kroll.proxy
public class TiResultSetProxy extends KrollProxy
{
	private static final String LCAT = "TiResultSet";
	private static final boolean DBG = TiConfig.LOGD;
	
	private static Method isFloat;
	private static Method isLong;
	private static Method isNull;
	private static Class  args[];
	static {
		args = new Class[1];
		args[0] = Integer.TYPE;
		
		try {
			isFloat = AbstractWindowedCursor.class.getMethod("isFloat", args);
			isLong  = AbstractWindowedCursor.class.getMethod("isLong",  args);
			isNull  = AbstractWindowedCursor.class.getMethod("isNull",  args);
		} catch (Exception e) {
			isFloat = null;
			isLong  = null;
			isNull  = null;
		}
	}

	protected Cursor rs;
	protected String lastException;
	protected HashMap<String, Integer> columnNames; // workaround case-sensitive matching in Google's implementation

	public TiResultSetProxy(TiContext tiContext, Cursor rs)
{'fraction_non_alphanumeric': 0.08795411089866156, 'fraction_numerical': 0.006373486297004461, 'mean_word_length': 4.889305816135084, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6963994', 'n_tokens_mistral': 1014, 'n_tokens_neox': 936, 'n_words': 265}