// Path: src/main/java/org/spongepowered/eventimplgen/AnnotationUtils.java
// public final class AnnotationUtils {
// 
//     private AnnotationUtils() {
//     }
// 
//     @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
//     public static <T> T getValue(final AnnotationMirror anno, final String key) {
//         if (anno == null) {
//             return null;
//         }
// 
//         for (final Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> element : anno.getElementValues().entrySet()) {
//             if (element.getKey().getSimpleName().contentEquals(key)) {
//                 return (T) element.getValue().getValue();
//             }
//         }
//         return null;
//     }
// 
//     public static @Nullable AnnotationMirror getAnnotation(final AnnotatedConstruct type, final Class<? extends Annotation> clazz) {
//         return AnnotationUtils.getAnnotation(type, clazz.getName());
//     }
// 
//     public static @Nullable AnnotationMirror getAnnotation(final AnnotatedConstruct type, final String name) {
//         for (final AnnotationMirror annotation : type.getAnnotationMirrors()) {
//             if (((TypeElement) annotation.getAnnotationType().asElement()).getQualifiedName().toString().equals(name)) {
//                 return annotation;
//             }
//         }
//         return null;
//     }
// 
//     public static boolean containsAnnotation(final AnnotatedConstruct type, final Set<String> looking) {
//         for (final AnnotationMirror annotation : type.getAnnotationMirrors()) {
//             if (looking.contains(((TypeElement) annotation.getAnnotationType().asElement()).getQualifiedName().toString())) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }
// 
// Path: src/main/java/org/spongepowered/eventimplgen/eventgencore/PropertySearchStrategy.java
// public interface PropertySearchStrategy {
// 
//     /**
//      * Enumerate a list of properties on a class, considering super types
//      * and implemented interfaces.
//      *
//      * <p>The returned list is sorted lexographically by property name</p>
//      *
//      * @param type The class
//      * @return A set of properties
//      */
//     List<Property> findProperties(final TypeElement type);
// 
// }


import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.api.util.annotation.eventgen.FactoryMethod;
import org.spongepowered.api.util.annotation.eventgen.internal.GeneratedEvent;
import org.spongepowered.eventimplgen.AnnotationUtils;
import org.spongepowered.eventimplgen.eventgencore.PropertySearchStrategy;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import javax.annotation.processing.Messager;
import javax.annotation.processing.RoundEnvironment;
import javax.inject.Inject;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.QualifiedNameable;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.ElementFilter;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.Diagnostic;
/*
 * This file is part of Event Implementation Generator, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered <https://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.spongepowered.eventimplgen.processor;




public class EventScanner {

    static final Pattern DOT_SPLIT = Pattern.compile("\\.");

    private final Set<String> inclusiveAnnotations;
    private final Set<String> exclusiveAnnotations;
    private final boolean debugMode;
    private final Types types;
    private final Elements elements;
    private final Messager messager;
// Path: src/main/java/org/spongepowered/eventimplgen/AnnotationUtils.java
// public final class AnnotationUtils {
// 
//     private AnnotationUtils() {
//     }
// 
//     @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
//     public static <T> T getValue(final AnnotationMirror anno, final String key) {
//         if (anno == null) {
//             return null;
//         }
// 
//         for (final Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> element : anno.getElementValues().entrySet()) {
//             if (element.getKey().getSimpleName().contentEquals(key)) {
//                 return (T) element.getValue().getValue();
//             }
//         }
//         return null;
//     }
// 
//     public static @Nullable AnnotationMirror getAnnotation(final AnnotatedConstruct type, final Class<? extends Annotation> clazz) {
//         return AnnotationUtils.getAnnotation(type, clazz.getName());
//     }
// 
//     public static @Nullable AnnotationMirror getAnnotation(final AnnotatedConstruct type, final String name) {
//         for (final AnnotationMirror annotation : type.getAnnotationMirrors()) {
//             if (((TypeElement) annotation.getAnnotationType().asElement()).getQualifiedName().toString().equals(name)) {
//                 return annotation;
//             }
//         }
//         return null;
//     }
// 
//     public static boolean containsAnnotation(final AnnotatedConstruct type, final Set<String> looking) {
//         for (final AnnotationMirror annotation : type.getAnnotationMirrors()) {
//             if (looking.contains(((TypeElement) annotation.getAnnotationType().asElement()).getQualifiedName().toString())) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }
// 
// Path: src/main/java/org/spongepowered/eventimplgen/eventgencore/PropertySearchStrategy.java
// public interface PropertySearchStrategy {
// 
//     /**
//      * Enumerate a list of properties on a class, considering super types
//      * and implemented interfaces.
//      *
//      * <p>The returned list is sorted lexographically by property name</p>
//      *
//      * @param type The class
//      * @return A set of properties
//      */
//     List<Property> findProperties(final TypeElement type);
// 
// }


// Path: src/main/java/org/spongepowered/eventimplgen/processor/EventScanner.java
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.api.util.annotation.eventgen.FactoryMethod;
import org.spongepowered.api.util.annotation.eventgen.internal.GeneratedEvent;
import org.spongepowered.eventimplgen.AnnotationUtils;
import org.spongepowered.eventimplgen.eventgencore.PropertySearchStrategy;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import javax.annotation.processing.Messager;
import javax.annotation.processing.RoundEnvironment;
import javax.inject.Inject;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.QualifiedNameable;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.ElementFilter;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.Diagnostic;

/*
 * This file is part of Event Implementation Generator, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered <https://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.spongepowered.eventimplgen.processor;




public class EventScanner {

    static final Pattern DOT_SPLIT = Pattern.compile("\\.");

    private final Set<String> inclusiveAnnotations;
    private final Set<String> exclusiveAnnotations;
    private final boolean debugMode;
    private final Types types;
    private final Elements elements;
    private final Messager messager;
    private final PropertySearchStrategy strategy;