Class LocationMethodExpression

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

public class LocationMethodExpression extends jakarta.el.MethodExpression implements FacesWrapper<jakarta.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$ $Date$
Author:
Jakob Korherr (latest modification by $Author$)
See Also:
  • Constructor Details

    • LocationMethodExpression

      public LocationMethodExpression()
    • LocationMethodExpression

      public LocationMethodExpression(Location location, jakarta.el.MethodExpression delegate)
    • LocationMethodExpression

      public LocationMethodExpression(Location location, jakarta.el.MethodExpression delegate, int ccLevel)
  • Method Details

    • 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)
    • apply

      public LocationMethodExpression apply(int newCCLevel, Location newLocation)
    • getMethodInfo

      public jakarta.el.MethodInfo getMethodInfo(jakarta.el.ELContext context)
      Specified by:
      getMethodInfo in class jakarta.el.MethodExpression
    • invoke

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

      public boolean equals(Object obj)
      Specified by:
      equals in class jakarta.el.Expression
    • getExpressionString

      public String getExpressionString()
      Specified by:
      getExpressionString in class jakarta.el.Expression
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class jakarta.el.Expression
    • isLiteralText

      public boolean isLiteralText()
      Specified by:
      isLiteralText in class jakarta.el.Expression
    • getWrapped

      public jakarta.el.MethodExpression getWrapped()
      Specified by:
      getWrapped in interface FacesWrapper<jakarta.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