<commit_before>/*******************************************************************************
 * Copyright 2015 See AUTHORS file.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

package de.tomgrill.gdxdialogs.core;

import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.badlogic.gdx.utils.reflect.ReflectionException;

public class GDXDialogsSystem {

	private Class<?> gdxClazz = null;
	private Object gdxAppObject = null;

	private GDXDialogs gdxDialogs;

	private static GDXDialogsSystem instance;

	private static boolean isInstalled = false;

	private GDXDialogsSystem() {

	}

	public static GDXDialogs install() {
		if (isInstalled) {
			throw new RuntimeException(GDXDialogsSystem.class.getSimpleName() + " has already been installed. You may not call install() more than once.");
		}
		isInstalled = true;
		instance = new GDXDialogsSystem();
		instance.installSystem();
		return GDXDialogsSystem.getDialogManager();
	}

	private void installSystem() {
		installGdxReflections();<commit_msg>install() now always creates new GDXDialogsSystem<commit_after>/*******************************************************************************
 * Copyright 2015 See AUTHORS file.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

package de.tomgrill.gdxdialogs.core;

import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.badlogic.gdx.utils.reflect.ReflectionException;

public class GDXDialogsSystem {

	private Class<?> gdxClazz = null;
	private Object gdxAppObject = null;

	private GDXDialogs gdxDialogs;

	private static GDXDialogsSystem instance;

	private GDXDialogsSystem() {

	}

	public static GDXDialogs install() {
		instance = new GDXDialogsSystem();
		instance.installSystem();
		return GDXDialogsSystem.getDialogManager();
	}

	private void installSystem() {
		installGdxReflections();
{'fraction_non_alphanumeric': 0.17256637168141592, 'fraction_numerical': 0.0050568900126422255, 'mean_word_length': 5.242603550295858, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7661372', 'n_tokens_mistral': 864, 'n_tokens_neox': 805, 'n_words': 284}