View Javadoc
1   package org.apache.maven.plugin.failsafe.xmlsummary;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import javax.xml.bind.annotation.XmlEnum;
23  import javax.xml.bind.annotation.XmlEnumValue;
24  import javax.xml.bind.annotation.XmlType;
25  
26  
27  /**
28   * <p>Java class for errorType.
29   * <p/>
30   * <p>The following schema fragment specifies the expected content contained within this class.
31   * <p/>
32   * <pre>
33   * &lt;simpleType name="errorType">
34   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
35   *     &lt;enumeration value="255"/>
36   *     &lt;enumeration value="254"/>
37   *   &lt;/restriction>
38   * &lt;/simpleType>
39   * </pre>
40   */
41  @XmlType( name = "errorType" )
42  @XmlEnum( Integer.class )
43  public enum ErrorType
44  {
45  
46      @XmlEnumValue( "255" )
47      FAILURE( 255 ),
48  
49      @XmlEnumValue( "254" )
50      NO_TESTS( 254 );
51  
52      private final int value;
53  
54      ErrorType( int v )
55      {
56          value = v;
57      }
58  
59      public static ErrorType fromValue( Integer v )
60      {
61          if ( v == null )
62          {
63              return null;
64          }
65  
66          for ( ErrorType c : ErrorType.values() )
67          {
68              if ( c.value == v )
69              {
70                  return c;
71              }
72          }
73          throw new IllegalArgumentException( "" + v );
74      }
75  
76      public int value()
77      {
78          return value;
79      }
80  
81  }