java.lang.Object
org.spongepowered.eventimplgen.factory.ClassContext

public final class ClassContext extends Object
Generation context for a class
  • Constructor Details

    • ClassContext

      @AssistedInject public ClassContext(Types types, Elements elements, @Assisted com.palantir.javapoet.TypeSpec.Builder builder)
  • Method Details

    • addField

      public ClassContext addField(com.palantir.javapoet.FieldSpec field)
    • addField

      public ClassContext addField(com.palantir.javapoet.FieldSpec.Builder field)
    • addField

      public ClassContext addField(TypeMirror typeMirror, String name, Modifier... modifiers)
    • addField

      public ClassContext addField(Property property)
    • addMethod

      public ClassContext addMethod(com.palantir.javapoet.MethodSpec methodSpec)
    • addMethod

      public ClassContext addMethod(com.palantir.javapoet.MethodSpec.Builder methodBuilder)
    • addMutator

      public ClassContext addMutator(TypeElement type, String fieldName, Property property)
      Generates a standard mutator method.

      This method assumes that a standard field has been generated for the provided Property

      Parameters:
      type - The Class of the event that's having an implementation generated
      fieldName - The name of the field to mutate
      property - The Property containing the mutator method to generate for