Class DefaultEvent

java.lang.Object
org.apache.maven.internal.impl.DefaultEvent
All Implemented Interfaces:
Event

public class DefaultEvent extends Object implements Event
  • Constructor Details

  • Method Details

    • getType

      public EventType getType()
      Description copied from interface: Event
      Gets the type of the event.
      Specified by:
      getType in interface Event
      Returns:
      the type of the event, never null
    • getSession

      public Session getSession()
      Description copied from interface: Event
      Gets the session from which this event originates.
      Specified by:
      getSession in interface Event
      Returns:
      the current session, never null
    • getProject

      public Optional<Project> getProject()
      Description copied from interface: Event
      Gets the current project (if any).
      Specified by:
      getProject in interface Event
      Returns:
      the current project or empty() if not applicable
    • getMojoExecution

      public Optional<MojoExecution> getMojoExecution()
      Description copied from interface: Event
      Gets the current mojo execution (if any).
      Specified by:
      getMojoExecution in interface Event
      Returns:
      the current mojo execution or empty() if not applicable
    • getException

      public Optional<Exception> getException()
      Description copied from interface: Event
      Gets the exception that caused the event (if any).
      Specified by:
      getException in interface Event
      Returns:
      the exception or empty() if none