Coverage Report - javax.faces.event.PhaseId
 
Classes in this File Line Coverage Branch Coverage Complexity
PhaseId
0%
0/25
N/A
0
 
 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 javax.faces.event;
 20  
 
 21  
 import java.util.ArrayList;
 22  
 import java.util.Collections;
 23  
 
 24  
 /**
 25  
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
 26  
  *
 27  
  * @author Thomas Spiegl (latest modification by $Author: skitching $)
 28  
  * @version $Revision: 676298 $ $Date: 2008-07-13 05:31:48 -0500 (Sun, 13 Jul 2008) $
 29  
  */
 30  
 public class PhaseId implements Comparable{
 31  
 
 32  
     // FIELDS
 33  
     public static final javax.faces.event.PhaseId ANY_PHASE;
 34  
     public static final javax.faces.event.PhaseId APPLY_REQUEST_VALUES;
 35  
     public static final javax.faces.event.PhaseId INVOKE_APPLICATION;
 36  
     public static final javax.faces.event.PhaseId PROCESS_VALIDATIONS;
 37  
     public static final javax.faces.event.PhaseId RENDER_RESPONSE;
 38  
     public static final javax.faces.event.PhaseId RESTORE_VIEW;
 39  
     public static final javax.faces.event.PhaseId UPDATE_MODEL_VALUES;
 40  
     public static final java.util.List VALUES;
 41  
 
 42  
     static
 43  
     {
 44  0
         int i = 0;
 45  0
         ArrayList<PhaseId> list = new ArrayList<PhaseId>(6);
 46  
 
 47  0
         ANY_PHASE = new PhaseId("ANY_PHASE",i++);
 48  0
         list.add(ANY_PHASE);
 49  0
         RESTORE_VIEW = new PhaseId("RESTORE_VIEW",i++);
 50  0
         list.add(RESTORE_VIEW);
 51  0
         APPLY_REQUEST_VALUES = new PhaseId("APPLY_REQUEST_VALUES",i++);
 52  0
         list.add(APPLY_REQUEST_VALUES);
 53  0
         PROCESS_VALIDATIONS = new PhaseId("PROCESS_VALIDATIONS",i++);
 54  0
         list.add(PROCESS_VALIDATIONS);
 55  0
         UPDATE_MODEL_VALUES = new PhaseId("UPDATE_MODEL_VALUES",i++);
 56  0
         list.add(UPDATE_MODEL_VALUES);
 57  0
         INVOKE_APPLICATION = new PhaseId("INVOKE_APPLICATION",i++);
 58  0
         list.add(INVOKE_APPLICATION);
 59  0
         RENDER_RESPONSE = new PhaseId("RENDER_RESPONSE",i++);
 60  0
         list.add(RENDER_RESPONSE);
 61  0
         VALUES = Collections.unmodifiableList(list);
 62  0
     }
 63  
 
 64  
 
 65  
     private final String _name;
 66  
     private final int _ordinal;
 67  
 
 68  
     // CONSTRUCTORS
 69  
     private PhaseId(String name, int ordinal)
 70  0
     {
 71  0
         this._name = name;
 72  0
         this._ordinal = ordinal;
 73  0
     }
 74  
 
 75  
     // METHODS
 76  
     public int compareTo(Object other)
 77  
     {
 78  0
         return _ordinal - ((PhaseId)other)._ordinal;
 79  
     }
 80  
 
 81  
     public int getOrdinal()
 82  
     {
 83  0
         return _ordinal;
 84  
     }
 85  
 
 86  
     public String toString()
 87  
     {
 88  0
         return _name + "(" + _ordinal + ")";
 89  
     }
 90  
 
 91  
 }