// Path: autobundle-processor/src/main/java/com/yatatsu/autobundle/processor/exceptions/ProcessingException.java
// public class ProcessingException extends RuntimeException {
// 
//     public ProcessingException(String message, Object... args) {
//         super(String.format(message, args));
//     }
// 
//     public ProcessingException(String message, Throwable throwable, Object... args) {
//         super(String.format(message, args), throwable);
//     }
// }


import com.yatatsu.autobundle.AutoBundleField;
import com.yatatsu.autobundle.AutoBundleGetter;
import com.yatatsu.autobundle.AutoBundleSetter;
import com.yatatsu.autobundle.processor.exceptions.ProcessingException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
        for (Element enclosedElement : element.getEnclosedElements()) {
            AutoBundleField annotation = enclosedElement.getAnnotation(AutoBundleField.class);
            if (annotation != null) {
                VariableElement fieldElement = (VariableElement) enclosedElement;
                final String getter = findGetterMethod(element, fieldElement, annotation);
                final String setter = findSetterMethod(element, fieldElement, annotation);
                AutoBundleBindingField field = new AutoBundleBindingField(
                        fieldElement, annotation, elementUtils, typeUtils, getter, setter);
                if (required == field.isRequired()) {
                    fields.add(field);
                }
            }
        }
        return fields;
    }

    private static String findGetterMethod(Element classElement,
                                   VariableElement fieldElement,
                                   AutoBundleField fieldAnnotation) {
        final String operation = "get";
        final String argKeyName = fieldAnnotation.key().length() > 0
                ? fieldAnnotation.key() : fieldElement.toString();
        for (Element element : classElement.getEnclosedElements()) {
            final String methodName = element.getSimpleName().toString();
            AutoBundleGetter annotation = element.getAnnotation(AutoBundleGetter.class);
            if (annotation != null) {
                // annotated getter
                if (argKeyName.equals(annotation.key())) {
                    // check modifier
                    if (element.getModifiers().contains(Modifier.PRIVATE)) {
// Path: autobundle-processor/src/main/java/com/yatatsu/autobundle/processor/exceptions/ProcessingException.java
// public class ProcessingException extends RuntimeException {
// 
//     public ProcessingException(String message, Object... args) {
//         super(String.format(message, args));
//     }
// 
//     public ProcessingException(String message, Throwable throwable, Object... args) {
//         super(String.format(message, args), throwable);
//     }
// }


// Path: autobundle-processor/src/main/java/com/yatatsu/autobundle/processor/BindingDetector.java
import com.yatatsu.autobundle.AutoBundleField;
import com.yatatsu.autobundle.AutoBundleGetter;
import com.yatatsu.autobundle.AutoBundleSetter;
import com.yatatsu.autobundle.processor.exceptions.ProcessingException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;

        for (Element enclosedElement : element.getEnclosedElements()) {
            AutoBundleField annotation = enclosedElement.getAnnotation(AutoBundleField.class);
            if (annotation != null) {
                VariableElement fieldElement = (VariableElement) enclosedElement;
                final String getter = findGetterMethod(element, fieldElement, annotation);
                final String setter = findSetterMethod(element, fieldElement, annotation);
                AutoBundleBindingField field = new AutoBundleBindingField(
                        fieldElement, annotation, elementUtils, typeUtils, getter, setter);
                if (required == field.isRequired()) {
                    fields.add(field);
                }
            }
        }
        return fields;
    }

    private static String findGetterMethod(Element classElement,
                                   VariableElement fieldElement,
                                   AutoBundleField fieldAnnotation) {
        final String operation = "get";
        final String argKeyName = fieldAnnotation.key().length() > 0
                ? fieldAnnotation.key() : fieldElement.toString();
        for (Element element : classElement.getEnclosedElements()) {
            final String methodName = element.getSimpleName().toString();
            AutoBundleGetter annotation = element.getAnnotation(AutoBundleGetter.class);
            if (annotation != null) {
                // annotated getter
                if (argKeyName.equals(annotation.key())) {
                    // check modifier
                    if (element.getModifiers().contains(Modifier.PRIVATE)) {
                        throw new ProcessingException("@AutoBundleGetter must not be private");