// Path: src/main/java/org/spongepowered/eventimplgen/eventgencore/Property.java
// public final class Property implements Comparable<Property> {
// 
//     private final String name;
//     private final TypeMirror type;
//     private final ExecutableElement leastSpecificMethod;
//     private final ExecutableElement mostSpecificMethod;
//     private final ExecutableElement accessor;
//     private final Optional<ExecutableElement> mutator;
// 
//     /**
//      * Create a new property.
//      *
//      * @param name The name of the property
//      * @param type The type of property
//      * @param leastSpecificMethod  The least specific method
//      * @param accessor The accessor
//      * @param mutator The mutator
//      */
//     public Property(
//         final String name,
//         final TypeMirror type,
//         final ExecutableElement leastSpecificMethod,
//         final ExecutableElement mostSpecificMethod,
//         final ExecutableElement accessor,
//         final @Nullable ExecutableElement mutator
//    ) {
//         this.name = Objects.requireNonNull(name, "name");
//         this.type = Objects.requireNonNull(type, "type");
//         this.leastSpecificMethod = Objects.requireNonNull(leastSpecificMethod, "leastSpecificMethod");
//         this.mostSpecificMethod = Objects.requireNonNull(mostSpecificMethod, "mostSpecificMethod");
//         this.accessor = Objects.requireNonNull(accessor, "accessor");
//         this.mutator = Optional.ofNullable(mutator);
//     }
// 
//     /**
//      * Get the name of the property.
//      *
//      * @return The name
//      */
//     public String getName() {
//         return this.name;
//     }
// 
//     /**
//      * Get the type of the paramteer.
//      *
//      * @return The type
//      */
//     public TypeMirror getType() {
//         return this.type;
//     }
// 
//     public TypeMirror getWrapperType() {
//         return this.type;
//     }
// 
//     /**
//      * Gets the least specific version of the accessor used.
//      *
//      * @return The least specific accessor
//      */
//     public ExecutableElement getLeastSpecificMethod() {
//         return this.leastSpecificMethod;
//     }
// 
//     /**
//      * Gets the least specific version of the type used
//      *
//      * <p>This is used for the type of the generated field used to hold the value.</p>
//      *
//      * @return The type
//      */
//     public TypeMirror getLeastSpecificType() {
//         return this.leastSpecificMethod.getReturnType();
//     }
// 
//     /**
//      * Get the most specific version of the accessor used.
//      *
//      * @return The least specific accessor
//      */
//     public ExecutableElement getMostSpecificMethod() {
//         return this.mostSpecificMethod;
//     }
// 
//     /**
//      * Gets the most specific version of the type used
//      *
//      * @return The type
//      */
//     public TypeMirror getMostSpecificType() {
//         return this.mostSpecificMethod.getReturnType();
//     }
// 
//     /**
//      * Get the method representing the accessor.
//      *
//      * @return The accessor
//      */
//     public ExecutableElement getAccessor() {
//         return this.accessor;
//     }
// 
//     public ExecutableElement getAccessorWrapper() {
//         return this.accessor;
//     }
// 
//     /**
//      * Get the method representing the mutator, which or may not exist.
//      *
//      * @return The mutator
//      */
//     public Optional<ExecutableElement> getMutator() {
//         return this.mutator;
//     }
// 
//     /**
//      * Tests whether this property's type is the least specific version used in the
//      * interface hierarchy.
//      *
//      * @return True if tis property's type is the least specific
//      */
//     public boolean isLeastSpecificType(final Types types) {
//         return types.isSameType(this.accessor.asType(), this.leastSpecificMethod.asType());
//     }
// 
//     public boolean isMostSpecificType(final Types types) {
//         return types.isSameType(this.accessor.asType(), this.mostSpecificMethod.asType());
//     }
// 
//     @Override
//     public int compareTo(final Property other) {
//         return this.getName().compareTo(other.getName());
//     }
// }


import dagger.assisted.Assisted;
import dagger.assisted.AssistedFactory;
import dagger.assisted.AssistedInject;
import org.spongepowered.api.util.annotation.eventgen.UseField;
import org.spongepowered.eventimplgen.eventgencore.Property;
import java.util.Optional;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
        }

        return this.addField(property.getType(), property.getName(), Modifier.PRIVATE);
    }

    public ClassContext addMethod(final MethodSpec methodSpec) {
        this.builder.addMethod(methodSpec);
        return this;
    }

    public ClassContext addMethod(final MethodSpec.Builder methodBuilder) {
        this.builder.addMethod(methodBuilder.build());
        return this;
    }

    /**
     * Generates a standard mutator method.
     *
     * <p>This method assumes that a standard field has been generated for the
     * provided {@link Property}</p>
     *
     * @param type The {@link Class} of the event that's having an
     *        implementation generated
     * @param fieldName The name of the field to mutate
     * @param property The {@link Property} containing the mutator method to
     *        generate for
     */
    public ClassContext addMutator(
        final TypeElement type,
        final String fieldName,
// Path: src/main/java/org/spongepowered/eventimplgen/eventgencore/Property.java
// public final class Property implements Comparable<Property> {
// 
//     private final String name;
//     private final TypeMirror type;
//     private final ExecutableElement leastSpecificMethod;
//     private final ExecutableElement mostSpecificMethod;
//     private final ExecutableElement accessor;
//     private final Optional<ExecutableElement> mutator;
// 
//     /**
//      * Create a new property.
//      *
//      * @param name The name of the property
//      * @param type The type of property
//      * @param leastSpecificMethod  The least specific method
//      * @param accessor The accessor
//      * @param mutator The mutator
//      */
//     public Property(
//         final String name,
//         final TypeMirror type,
//         final ExecutableElement leastSpecificMethod,
//         final ExecutableElement mostSpecificMethod,
//         final ExecutableElement accessor,
//         final @Nullable ExecutableElement mutator
//    ) {
//         this.name = Objects.requireNonNull(name, "name");
//         this.type = Objects.requireNonNull(type, "type");
//         this.leastSpecificMethod = Objects.requireNonNull(leastSpecificMethod, "leastSpecificMethod");
//         this.mostSpecificMethod = Objects.requireNonNull(mostSpecificMethod, "mostSpecificMethod");
//         this.accessor = Objects.requireNonNull(accessor, "accessor");
//         this.mutator = Optional.ofNullable(mutator);
//     }
// 
//     /**
//      * Get the name of the property.
//      *
//      * @return The name
//      */
//     public String getName() {
//         return this.name;
//     }
// 
//     /**
//      * Get the type of the paramteer.
//      *
//      * @return The type
//      */
//     public TypeMirror getType() {
//         return this.type;
//     }
// 
//     public TypeMirror getWrapperType() {
//         return this.type;
//     }
// 
//     /**
//      * Gets the least specific version of the accessor used.
//      *
//      * @return The least specific accessor
//      */
//     public ExecutableElement getLeastSpecificMethod() {
//         return this.leastSpecificMethod;
//     }
// 
//     /**
//      * Gets the least specific version of the type used
//      *
//      * <p>This is used for the type of the generated field used to hold the value.</p>
//      *
//      * @return The type
//      */
//     public TypeMirror getLeastSpecificType() {
//         return this.leastSpecificMethod.getReturnType();
//     }
// 
//     /**
//      * Get the most specific version of the accessor used.
//      *
//      * @return The least specific accessor
//      */
//     public ExecutableElement getMostSpecificMethod() {
//         return this.mostSpecificMethod;
//     }
// 
//     /**
//      * Gets the most specific version of the type used
//      *
//      * @return The type
//      */
//     public TypeMirror getMostSpecificType() {
//         return this.mostSpecificMethod.getReturnType();
//     }
// 
//     /**
//      * Get the method representing the accessor.
//      *
//      * @return The accessor
//      */
//     public ExecutableElement getAccessor() {
//         return this.accessor;
//     }
// 
//     public ExecutableElement getAccessorWrapper() {
//         return this.accessor;
//     }
// 
//     /**
//      * Get the method representing the mutator, which or may not exist.
//      *
//      * @return The mutator
//      */
//     public Optional<ExecutableElement> getMutator() {
//         return this.mutator;
//     }
// 
//     /**
//      * Tests whether this property's type is the least specific version used in the
//      * interface hierarchy.
//      *
//      * @return True if tis property's type is the least specific
//      */
//     public boolean isLeastSpecificType(final Types types) {
//         return types.isSameType(this.accessor.asType(), this.leastSpecificMethod.asType());
//     }
// 
//     public boolean isMostSpecificType(final Types types) {
//         return types.isSameType(this.accessor.asType(), this.mostSpecificMethod.asType());
//     }
// 
//     @Override
//     public int compareTo(final Property other) {
//         return this.getName().compareTo(other.getName());
//     }
// }


// Path: src/main/java/org/spongepowered/eventimplgen/factory/ClassContext.java
import dagger.assisted.Assisted;
import dagger.assisted.AssistedFactory;
import dagger.assisted.AssistedInject;
import org.spongepowered.api.util.annotation.eventgen.UseField;
import org.spongepowered.eventimplgen.eventgencore.Property;
import java.util.Optional;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;

        }

        return this.addField(property.getType(), property.getName(), Modifier.PRIVATE);
    }

    public ClassContext addMethod(final MethodSpec methodSpec) {
        this.builder.addMethod(methodSpec);
        return this;
    }

    public ClassContext addMethod(final MethodSpec.Builder methodBuilder) {
        this.builder.addMethod(methodBuilder.build());
        return this;
    }

    /**
     * Generates a standard mutator method.
     *
     * <p>This method assumes that a standard field has been generated for the
     * provided {@link Property}</p>
     *
     * @param type The {@link Class} of the event that's having an
     *        implementation generated
     * @param fieldName The name of the field to mutate
     * @param property The {@link Property} containing the mutator method to
     *        generate for
     */
    public ClassContext addMutator(
        final TypeElement type,
        final String fieldName,
        final Property property