View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.surefire.api.event;
20  
21  import org.apache.maven.surefire.api.report.StackTraceWriter;
22  
23  import static org.apache.maven.surefire.api.booter.ForkedProcessEventType.BOOTERCODE_JVM_EXIT_ERROR;
24  
25  /**
26   * The event for the JVM exit error.
27   *
28   * @since 3.0.0-M5
29   */
30  public final class JvmExitErrorEvent extends Event {
31      private final StackTraceWriter stackTraceWriter;
32  
33      public JvmExitErrorEvent(StackTraceWriter stackTraceWriter) {
34          super(BOOTERCODE_JVM_EXIT_ERROR);
35          this.stackTraceWriter = stackTraceWriter;
36      }
37  
38      public StackTraceWriter getStackTraceWriter() {
39          return stackTraceWriter;
40      }
41  
42      @Override
43      public boolean isControlCategory() {
44          return false;
45      }
46  
47      @Override
48      public boolean isConsoleCategory() {
49          return false;
50      }
51  
52      @Override
53      public boolean isConsoleErrorCategory() {
54          return false;
55      }
56  
57      @Override
58      public boolean isStandardStreamCategory() {
59          return false;
60      }
61  
62      @Override
63      public boolean isSysPropCategory() {
64          return false;
65      }
66  
67      @Override
68      public boolean isTestCategory() {
69          return false;
70      }
71  
72      @Override
73      public boolean isJvmExitError() {
74          return true;
75      }
76  }