<commit_before>package com.print_stack_trace.voogasalad.model.engine.runtime.camera;

import com.print_stack_trace.voogasalad.model.engine.physics.CollisionHandler;

public class CameraFactory {

	public enum CameraType {
		ConstantHorizonalScroll,
		ConstantVerticalScroll,
		PlayerFollow
	}
	
	public static CameraHandler buildCameraHandler(CameraType myCameraType){
		return null;
		
	}

}<commit_msg>added camerahandler factory<commit_after>package com.print_stack_trace.voogasalad.model.engine.runtime.camera;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;


public class CameraFactory {

	public static final String cameraPath = "com.print_stack_trace.voogasalad.model.engine.runtime.camera.";


	public enum CameraType {
		ConstantHorizontalScroll,
		ConstantVerticalScroll,
		PlayerFollow
	}

	public static CameraHandler buildCameraHandler(CameraType myCameraType){
		Constructor<?> con = null;
		CameraHandler newCamera = null;

		try {
			String objectType = myCameraType.toString();
			System.out.println(cameraPath+objectType);
			Class<?> newCameraClass = Class.forName(cameraPath + objectType);
			try {
				con = newCameraClass.getConstructor();
			} catch (NoSuchMethodException | SecurityException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			try {
				newCamera = (CameraHandler) con.newInstance();
			} catch (InstantiationException | IllegalAccessException | IllegalArgumentException
					| InvocationTargetException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return newCamera;
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}

		return null;
	}

}

{'fraction_non_alphanumeric': 0.08716136631330977, 'fraction_numerical': 0.0, 'mean_word_length': 4.739864864864865, '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': '1093069', 'n_tokens_mistral': 548, 'n_tokens_neox': 479, 'n_words': 98}