Coverage Report - org.seasar.teeda.core.el.SimpleMethodBinding
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleMethodBinding
29%
4/14
0%
0/2
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.el;
 17  
 
 18  
 import javax.faces.component.StateHolder;
 19  
 import javax.faces.context.FacesContext;
 20  
 import javax.faces.el.EvaluationException;
 21  
 import javax.faces.el.MethodBinding;
 22  
 import javax.faces.el.MethodNotFoundException;
 23  
 
 24  
 /**
 25  
  * @author higa
 26  
  *  
 27  
  */
 28  
 
 29  
 public class SimpleMethodBinding extends MethodBinding implements StateHolder {
 30  
 
 31  
     private String outcome_;
 32  
 
 33  2
     private boolean transient_ = false;
 34  
 
 35  0
     public SimpleMethodBinding() {
 36  0
     }
 37  
 
 38  2
     public SimpleMethodBinding(String outcome) {
 39  2
         outcome_ = outcome;
 40  2
     }
 41  
 
 42  
     public Object invoke(FacesContext context, Object args[])
 43  
             throws EvaluationException, MethodNotFoundException {
 44  
 
 45  0
         return outcome_;
 46  
     }
 47  
 
 48  
     public Class getType(FacesContext context) throws MethodNotFoundException {
 49  0
         return String.class;
 50  
     }
 51  
 
 52  
     public Object saveState(FacesContext context) {
 53  0
         return outcome_;
 54  
     }
 55  
 
 56  
     public void restoreState(FacesContext context, Object obj) {
 57  0
         outcome_ = (String) obj;
 58  0
     }
 59  
 
 60  
     public boolean isTransient() {
 61  0
         return transient_;
 62  
     }
 63  
 
 64  
     public void setTransient(boolean b) {
 65  0
         transient_ = b;
 66  0
     }
 67  
 }