public LocationMethodExpression apply(int newCCLevel) { if(this.ccLevel == newCCLevel) { return this; } else { return new LocationMethodExpression(this.location, this.delegate, newCCLevel); } }
if (location != null) return ((LocationMethodExpression)localCachedExpression[(i*3)+2]).apply( actx.getFaceletCompositionContext().getCompositeComponentLevel(), location); return ((LocationMethodExpression)localCachedExpression[(i*3)+2]).apply( actx.getFaceletCompositionContext().getCompositeComponentLevel()); methodExpression = new LocationMethodExpression(currentLocation, methodExpression, actx.getFaceletCompositionContext().getCompositeComponentLevel());
public LocationMethodExpression apply(int newCCLevel, Location newLocation) { if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath())) { return this; } else { return new LocationMethodExpression(newLocation, this.delegate, newCCLevel); } }
@SuppressWarnings("unchecked") private MethodExpression reWrapMethodExpression(MethodExpression createdMethodExpression, ValueExpression originalValueExpression) { if (originalValueExpression instanceof LocationValueExpression) { return new LocationMethodExpression( ((LocationValueExpression)originalValueExpression).getLocation(), reWrapMethodExpression(createdMethodExpression, ((LocationValueExpression)originalValueExpression).getWrapped())); } else if (originalValueExpression instanceof FacesWrapper && ((FacesWrapper)originalValueExpression).getWrapped() instanceof ValueExpression) { return reWrapMethodExpression(createdMethodExpression, (ValueExpression) ((FacesWrapper)originalValueExpression).getWrapped()); } else { return createdMethodExpression; } }
@SuppressWarnings("unchecked") private MethodExpression reWrapMethodExpression(MethodExpression createdMethodExpression, ValueExpression originalValueExpression) { if (originalValueExpression instanceof LocationValueExpression) { return new LocationMethodExpression( ((LocationValueExpression)originalValueExpression).getLocation(), reWrapMethodExpression(createdMethodExpression, ((LocationValueExpression)originalValueExpression).getWrapped())); } else if (originalValueExpression instanceof FacesWrapper && ((FacesWrapper)originalValueExpression).getWrapped() instanceof ValueExpression) { return reWrapMethodExpression(createdMethodExpression, (ValueExpression) ((FacesWrapper)originalValueExpression).getWrapped()); } else { return createdMethodExpression; } }
@SuppressWarnings("unchecked") private MethodExpression reWrapMethodExpression(MethodExpression createdMethodExpression, ValueExpression originalValueExpression) { if (originalValueExpression instanceof LocationValueExpression) { return new LocationMethodExpression( ((LocationValueExpression) originalValueExpression).getLocation(), reWrapMethodExpression(createdMethodExpression, ((LocationValueExpression) originalValueExpression).getWrapped()), ((LocationValueExpression) originalValueExpression).getCCLevel()); } else if (originalValueExpression instanceof FacesWrapper && ((FacesWrapper) originalValueExpression).getWrapped() instanceof ValueExpression) { return reWrapMethodExpression(createdMethodExpression, (ValueExpression) ((FacesWrapper) originalValueExpression).getWrapped()); } else { return createdMethodExpression; } }
methodExpression = new LocationMethodExpression(getLocation(), methodExpression);
methodExpression = new LocationMethodExpression(getLocation(), methodExpression);