Class DefaultExecutionEvent
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.DefaultExecutionEvent
-
- All Implemented Interfaces:
ExecutionEvent
class DefaultExecutionEvent extends java.lang.Object implements ExecutionEvent
Holds data relevant for an execution event.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.maven.execution.ExecutionEvent
ExecutionEvent.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Exception
exception
private MojoExecution
mojoExecution
private MavenSession
session
private ExecutionEvent.Type
type
-
Constructor Summary
Constructors Constructor Description DefaultExecutionEvent(ExecutionEvent.Type type, MavenSession session, MojoExecution mojoExecution, java.lang.Exception exception)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Exception
getException()
Gets the exception that caused the event (if any).MojoExecution
getMojoExecution()
Gets the current mojo execution (if any).MavenProject
getProject()
Gets the current project (if any).MavenSession
getSession()
Gets the session from which this event originates.ExecutionEvent.Type
getType()
Gets the type of the event.
-
-
-
Field Detail
-
type
private final ExecutionEvent.Type type
-
session
private final MavenSession session
-
mojoExecution
private final MojoExecution mojoExecution
-
exception
private final java.lang.Exception exception
-
-
Constructor Detail
-
DefaultExecutionEvent
DefaultExecutionEvent(ExecutionEvent.Type type, MavenSession session, MojoExecution mojoExecution, java.lang.Exception exception)
-
-
Method Detail
-
getType
public ExecutionEvent.Type getType()
Description copied from interface:ExecutionEvent
Gets the type of the event.- Specified by:
getType
in interfaceExecutionEvent
- Returns:
- The type of the event, never
null
.
-
getSession
public MavenSession getSession()
Description copied from interface:ExecutionEvent
Gets the session from which this event originates.- Specified by:
getSession
in interfaceExecutionEvent
- Returns:
- The current session, never
null
.
-
getProject
public MavenProject getProject()
Description copied from interface:ExecutionEvent
Gets the current project (if any).- Specified by:
getProject
in interfaceExecutionEvent
- Returns:
- The current project or
null
if not applicable.
-
getMojoExecution
public MojoExecution getMojoExecution()
Description copied from interface:ExecutionEvent
Gets the current mojo execution (if any).- Specified by:
getMojoExecution
in interfaceExecutionEvent
- Returns:
- The current mojo execution or
null
if not applicable.
-
getException
public java.lang.Exception getException()
Description copied from interface:ExecutionEvent
Gets the exception that caused the event (if any).- Specified by:
getException
in interfaceExecutionEvent
- Returns:
- The exception or
null
if none.
-
-