org.apache.myfaces.view.facelets.el
Class LocationMethodExpression

java.lang.Object
  extended by javax.el.Expression
      extended by javax.el.MethodExpression
          extended by org.apache.myfaces.view.facelets.el.LocationMethodExpression
All Implemented Interfaces:
Externalizable, Serializable, FacesWrapper<javax.el.MethodExpression>, LocationAware

public class LocationMethodExpression
extends javax.el.MethodExpression
implements FacesWrapper<javax.el.MethodExpression>, Externalizable, LocationAware

A MethodExpression that contains the original MethodExpression and the Location of the facelet file from which the MethodExpression was created. This is needed when the current composite component (cc) has to be resolved by the MethodExpression, because #{cc} refers to the composite component which is implemented in the file the MethodExpression comes from and not the one currently on top of the composite component stack. This MethodExpression implementation passes through all methods to the delegate MethodExpression, but saves the related composite component in a FacesContext attribute before the invocation of the method on the delegate and removes it afterwards.

Version:
$Revision: 1351627 $ $Date: 2012-06-19 04:50:21 -0500 (Tue, 19 Jun 2012) $
Author:
Jakob Korherr (latest modification by $Author: lu4242 $)
See Also:
Serialized Form

Constructor Summary
LocationMethodExpression()
           
LocationMethodExpression(Location location, javax.el.MethodExpression delegate)
           
LocationMethodExpression(Location location, javax.el.MethodExpression delegate, int ccLevel)
           
 
Method Summary
 LocationMethodExpression apply(int newCCLevel)
           
 boolean equals(Object obj)
           
 String getExpressionString()
           
 Location getLocation()
           
 javax.el.MethodInfo getMethodInfo(javax.el.ELContext context)
           
 javax.el.MethodExpression getWrapped()
           
 int hashCode()
           
 Object invoke(javax.el.ELContext context, Object[] params)
           
 boolean isLiteralText()
           
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class javax.el.MethodExpression
isParmetersProvided
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationMethodExpression

public LocationMethodExpression()

LocationMethodExpression

public LocationMethodExpression(Location location,
                                javax.el.MethodExpression delegate)

LocationMethodExpression

public LocationMethodExpression(Location location,
                                javax.el.MethodExpression delegate,
                                int ccLevel)
Method Detail

getLocation

public Location getLocation()
Specified by:
getLocation in interface LocationAware
Returns:
the Location instance where this object exists/is related to

apply

public LocationMethodExpression apply(int newCCLevel)

getMethodInfo

public javax.el.MethodInfo getMethodInfo(javax.el.ELContext context)
Specified by:
getMethodInfo in class javax.el.MethodExpression

invoke

public Object invoke(javax.el.ELContext context,
                     Object[] params)
Specified by:
invoke in class javax.el.MethodExpression

equals

public boolean equals(Object obj)
Specified by:
equals in class javax.el.Expression

getExpressionString

public String getExpressionString()
Specified by:
getExpressionString in class javax.el.Expression

hashCode

public int hashCode()
Specified by:
hashCode in class javax.el.Expression

isLiteralText

public boolean isLiteralText()
Specified by:
isLiteralText in class javax.el.Expression

getWrapped

public javax.el.MethodExpression getWrapped()
Specified by:
getWrapped in interface FacesWrapper<javax.el.MethodExpression>

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.