<commit_before>package com.mykumi.springlab.exam.dynamicproxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class UppercaseHandler implements InvocationHandler {
	Hello target;
	
	public UppercaseHandler(Hello target) {
		this.target = target;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		String ret = (String)method.invoke(target, args);
		return ret.toUpperCase();
	}

}<commit_msg>6.3.2 다이내믹 프록시 - 다이내믹 프록시 확장 - Target Object의 Return Type이나 수행되어야할 Method에 선별적 기능적용<commit_after>package com.mykumi.springlab.exam.dynamicproxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class UppercaseHandler implements InvocationHandler {
	Object target;
	
	public UppercaseHandler(Object target) {
		this.target = target;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		Object ret = method.invoke(target, args);
		if (ret instanceof String && method.getName().startsWith("say")) {
			return ((String)ret).toUpperCase();
		} else {
			return ret;
		}
	}

}
{'fraction_non_alphanumeric': 0.10209424083769633, 'fraction_numerical': 0.002617801047120419, 'mean_word_length': 4.763819095477387, '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': '4048714', 'n_tokens_mistral': 398, 'n_tokens_neox': 404, 'n_words': 91}