Class AccessorModifierEventFactoryPlugin

java.lang.Object
org.spongepowered.eventimplgen.factory.plugin.AccessorModifierEventFactoryPlugin
All Implemented Interfaces:
EventFactoryPlugin

public class AccessorModifierEventFactoryPlugin extends Object implements EventFactoryPlugin
An event factory plugin to modify the return type of an accessor by calling one of its methods.
  • Method Details

    • contributeProperty

      public EventFactoryPlugin.Result contributeProperty(TypeElement eventClass, ClassContext classWriter, Property property)
      Description copied from interface: EventFactoryPlugin
      Called to allow a plugin to override the generation of the field and method(s) for a Property.

      If an event factory plugin does not have any special behavior for the provided Property, it should return false, which passes on the property to other plugins for processing.

      Returning true stops the processing of the provided Property.

      Specified by:
      contributeProperty in interface EventFactoryPlugin
      Parameters:
      eventClass - The Class of the event an implementation is being generated for
      classWriter - The ClassContext holding information about the implementation class
      property - The Property being processed
      Returns:
      whether the provided Property was processed.