com.sun.rave.web.ui.el
Class ConstantMethodBinding

java.lang.Object
  extended by javax.faces.el.MethodBinding
      extended by com.sun.rave.web.ui.el.ConstantMethodBinding
All Implemented Interfaces:
javax.faces.component.StateHolder

public class ConstantMethodBinding
extends javax.faces.el.MethodBinding
implements javax.faces.component.StateHolder

Implementation of MethodBinding that always returns the value specified to our constructor.


Constructor Summary
ConstantMethodBinding()
          Zero arguments constructor for restoring state.
ConstantMethodBinding(java.lang.String value)
          Create a new MethodBinding that always returns the specified value.
 
Method Summary
 java.lang.String getExpressionString()
          Return the expression string for this method binding.
 java.lang.Class getType(javax.faces.context.FacesContext context)
          Return the expected return type class.
 java.lang.Object invoke(javax.faces.context.FacesContext context, java.lang.Object[] params)
          Return the appropriate constant value.
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setTransient(boolean transientFlag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantMethodBinding

public ConstantMethodBinding()

Zero arguments constructor for restoring state.


ConstantMethodBinding

public ConstantMethodBinding(java.lang.String value)

Create a new MethodBinding that always returns the specified value.

Method Detail

invoke

public java.lang.Object invoke(javax.faces.context.FacesContext context,
                               java.lang.Object[] params)

Return the appropriate constant value.

Specified by:
invoke in class javax.faces.el.MethodBinding
Parameters:
context - FacesContext for this request
params - Method parameters to pass in

getType

public java.lang.Class getType(javax.faces.context.FacesContext context)

Return the expected return type class.

Specified by:
getType in class javax.faces.el.MethodBinding
Parameters:
context - FacesContext for this request

getExpressionString

public java.lang.String getExpressionString()

Return the expression string for this method binding.

Overrides:
getExpressionString in class javax.faces.el.MethodBinding

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean transientFlag)
Specified by:
setTransient in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder