<commit_before>package org.jconverter;

import org.jconverter.converter.Converter;
import org.jconverter.converter.ConverterManager;
import org.jconverter.converter.JGumConverterManager;
import org.jconverter.instantiation.InstanceCreator;
import org.jconverter.instantiation.InstantiationManager;
import org.jconverter.instantiation.JGumInstantiationManager;
import org.jconverter.typesolver.JGumTypeSolverManager;
import org.jconverter.typesolver.TypeSolver;
import org.jconverter.typesolver.TypeSolverManager;
import org.jgum.JGum;


/**
 * A fluent API for instantiation JConverter contexts.
 * @author sergioc
 *
 */
public class JConverterBuilder {

	private final ConverterManager converterManager;
	private final InstantiationManager instantiationManager;
	private final TypeSolverManager typeSolverManager;
	
	public static JConverterBuilder create() {
		return new JConverterBuilder();
	}
	
	private JConverterBuilder() {
		JGum jgum = new JGum();
		this.converterManager = JGumConverterManager.createDefault(jgum);
		this.instantiationManager = JGumInstantiationManager.createDefault(jgum);
		this.typeSolverManager = JGumTypeSolverManager.createDefault(jgum);
	}
	
	/**
	 * 
	 * @return a new JConverter context according to the configured builder.
	 */
	public JConverter build() {
		return new JConverter(converterManager, instantiationManager, typeSolverManager);
	}
	
	/**
	 * Registers a converter.
	 * @param converter a converter to register.
	 */
	public void register(Converter converter) {
		converterManager.register(converter);
	}
	
	/**
	 * Registers a converter under a given key.
	 * @param key the key under which the converter is registered.
	 * @param converter the converter to register.
	 */
	public void register(Object key, Converter converter) {<commit_msg>changed some members to protected<commit_after>package org.jconverter;

import org.jconverter.converter.Converter;
import org.jconverter.converter.ConverterManager;
import org.jconverter.converter.JGumConverterManager;
import org.jconverter.instantiation.InstanceCreator;
import org.jconverter.instantiation.InstantiationManager;
import org.jconverter.instantiation.JGumInstantiationManager;
import org.jconverter.typesolver.JGumTypeSolverManager;
import org.jconverter.typesolver.TypeSolver;
import org.jconverter.typesolver.TypeSolverManager;
import org.jgum.JGum;


/**
 * A fluent API for instantiation JConverter contexts.
 * @author sergioc
 *
 */
public class JConverterBuilder {

	protected final ConverterManager converterManager;
	protected final InstantiationManager instantiationManager;
	protected final TypeSolverManager typeSolverManager;
	
	public static JConverterBuilder create() {
		return new JConverterBuilder();
	}
	
	protected JConverterBuilder() {
		JGum jgum = new JGum();
		this.converterManager = JGumConverterManager.createDefault(jgum);
		this.instantiationManager = JGumInstantiationManager.createDefault(jgum);
		this.typeSolverManager = JGumTypeSolverManager.createDefault(jgum);
	}
	
	/**
	 * 
	 * @return a new JConverter context according to the configured builder.
	 */
	public JConverter build() {
		return new JConverter(converterManager, instantiationManager, typeSolverManager);
	}
	
	/**
	 * Registers a converter.
	 * @param converter a converter to register.
	 */
	public void register(Converter converter) {
		converterManager.register(converter);
	}
	
	/**
	 * Registers a converter under a given key.
	 * @param key the key under which the converter is registered.
	 * @param converter the converter to register.
	 */
	public void register(Object key, Converter converter) {
{'fraction_non_alphanumeric': 0.07973421926910298, 'fraction_numerical': 0.0, 'mean_word_length': 5.463327370304114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7481945', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1018, 'n_words': 256}