Class AccessorModifierEventFactoryPlugin
java.lang.Object
org.spongepowered.eventimplgen.factory.plugin.AccessorModifierEventFactoryPlugin
- All Implemented Interfaces:
EventFactoryPlugin
An event factory plugin to modify the return type of an accessor
by calling one of its methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.eventimplgen.factory.plugin.EventFactoryPlugin
EventFactoryPlugin.Result -
Method Summary
Modifier and TypeMethodDescriptioncontributeProperty(TypeElement eventClass, ClassContext classWriter, Property property) Called to allow a plugin to override the generation of the field and method(s) for aProperty.
-
Method Details
-
contributeProperty
public EventFactoryPlugin.Result contributeProperty(TypeElement eventClass, ClassContext classWriter, Property property) Description copied from interface:EventFactoryPluginCalled to allow a plugin to override the generation of the field and method(s) for aProperty.If an event factory plugin does not have any special behavior for the provided
Property, it should returnfalse, which passes on the property to other plugins for processing.Returning
truestops the processing of the providedProperty.- Specified by:
contributePropertyin interfaceEventFactoryPlugin- Parameters:
eventClass- TheClassof the event an implementation is being generated forclassWriter- TheClassContextholding information about the implementation classproperty- ThePropertybeing processed- Returns:
- whether the provided
Propertywas processed.
-