class PluginStateEvent extends EventObject {

    private final PluginWrapper plugin;
    private final PluginState oldState;

    public PluginStateEvent(PluginManager source, PluginWrapper plugin, PluginState oldState) {
        super(source);

        this.plugin = plugin;
        this.oldState = oldState;
    }

    /**
     * The object on which the Event initially occurred.
     *
     * @return the PluginManager that changed the state of the plugin
     */
    @Override
    public PluginManager getSource() {
        return (PluginManager) super.getSource();
    }

    /**
     * The plugin that changed its state.
     *
     * @return the plugin that changed its state
     */
    public PluginWrapper getPlugin() {
        return plugin;
    }

    /**
     * The new state of the plugin.
     *
     * @return the new state of the plugin
     */
    public PluginState getPluginState() {
        return plugin.getPluginState();
    }

    /**
     * The old state of the plugin.
     *
     * @return the old state of the plugin
     */
    public PluginState getOldState() {
        return oldState;
    }

    @Override
    public String toString() {<FILL_FUNCTION_BODY>}

}

        return "PluginStateEvent [plugin=" + plugin.getPluginId() +
                ", newState=" + getPluginState() +
                ", oldState=" + oldState +
                ']';
    
<methods>public void <init>(java.lang.Object) ,public java.lang.Object getSource() ,public java.lang.String toString() <variables>private static final long serialVersionUID,protected transient java.lang.Object source