gt:         if (expr != null && expr.isLiteralText()) {
context: /*
   * Copyright (c) 1998-2011 Caucho Technology -- all rights reserved
   *
   * This file is part of Resin(R) Open Source
   *
   * Each copy or derived work must preserve the copyright notice and this
   * notice unmodified.
   *
   * Resin Open Source is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2
   * as published by the Free Software Foundation.
   *
   * Resin Open Source is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
   * of NON-INFRINGEMENT.  See the GNU General Public License for more
   * details.
   *
   * You should have received a copy of the GNU General Public License
   * along with Resin Open Source; if not, write to the
   *
   *   Free Software Foundation, Inc.
   *   59 Temple Place, Suite 330
   *   Boston, MA 02111-1307  USA
   *
   * @author Scott Ferguson
   */
  
  package javax.faces.component;
  
  import java.util.*;
  
  import javax.el.*;
  import javax.faces.context.*;
  import javax.faces.model.*;
  
  public class UISelectItem extends UIComponentBase
  {
    public static final String COMPONENT_FAMILY = "javax.faces.SelectItem";
    public static final String COMPONENT_TYPE = "javax.faces.SelectItem";
  
    private static final HashMap<String,PropEnum> _propMap
      = new HashMap<String,PropEnum>();
  
    private String _itemDescription;
    private ValueExpression _itemDescriptionExpr;
  
    private Boolean _itemDisabled;
    private ValueExpression _itemDisabledExpr;
  
    private Boolean _itemEscaped;
    private ValueExpression _itemEscapedExpr;
  
    private String _itemLabel;
    private ValueExpression _itemLabelExpr;
  
    private Object _itemValue;
    private ValueExpression _itemValueExpr;
  
    private Object _value;
    private ValueExpression _valueExpr;
  
    public UISelectItem()
    {
    }
  
    /**
     * Returns the component family, used to select the renderer.
     */
    public String getFamily()
    {
      return COMPONENT_FAMILY;
    }
  
    //
    // properties
    //
  
    public String getItemDescription()
    {
      if (_itemDescription != null)
        return _itemDescription;
      else if (_itemDescriptionExpr != null)
        return Util.evalString(_itemDescriptionExpr, getFacesContext());
      else
        return null;
    }
  
    public void setItemDescription(String value)
    {
      _itemDescription = value;
    }
  
    public boolean isItemDisabled()
    {
      if (_itemDisabled != null)
        return _itemDisabled;
      else if (_itemDisabledExpr != null)
        return Util.evalBoolean(_itemDisabledExpr, getFacesContext());
      else
        return false;
    }
  
    public void setItemDisabled(boolean value)
    {
      _itemDisabled = value;
    }
  
    public boolean isItemEscaped()
    {
      if (_itemEscaped != null)
        return _itemEscaped;
      else if (_itemEscapedExpr != null)
        return Util.evalBoolean(_itemEscapedExpr, getFacesContext());
      else
        return true;
    }
  
    public void setItemEscaped(boolean value)
    {
      _itemEscaped = value;
    }
  
    public String getItemLabel()
    {
      if (_itemLabel != null)
        return _itemLabel;
      else if (_itemLabelExpr != null)
        return Util.evalString(_itemLabelExpr, getFacesContext());
      else
        return null;
    }
  
    public void setItemLabel(String value)
    {
      _itemLabel = value;
    }
  
    public Object getItemValue()
    {
      if (_itemValue != null)
        return _itemValue;
      else if (_itemValueExpr != null)
        return Util.eval(_itemValueExpr, getFacesContext());
      else
        return null;
    }
  
    public void setItemValue(Object value)
    {
      _itemValue = value;
    }
  
    public Object getValue()
    {
      if (_value != null)
        return _value;
      else if (_valueExpr != null)
        return Util.eval(_valueExpr, getFacesContext());
      else
        return null;
    }
  
    public void setValue(Object value)
    {
      _value = value;
    }
  
    /**
     * Returns the value expression with the given name.
     */
    @Override
    public ValueExpression getValueExpression(String name)
    {
      PropEnum prop = _propMap.get(name);
  
      if (prop != null) {
        switch (prop) {
        case ITEM_DESCRIPTION:
          return _itemDescriptionExpr;
        case ITEM_DISABLED:
          return _itemDisabledExpr;
        case ITEM_ESCAPED:
          return _itemEscapedExpr;
        case ITEM_LABEL:
          return _itemLabelExpr;
        case ITEM_VALUE:
          return _itemValueExpr;
        case VALUE:
          return _valueExpr;
        }
      }
      
      return super.getValueExpression(name);
    }
  
    /**
     * Sets the value expression with the given name.
     */
    @Override
    public void setValueExpression(String name, ValueExpression expr)
    {
      PropEnum prop = _propMap.get(name);
  
      if (prop != null) {
        switch (prop) {
        case ITEM_DESCRIPTION:
          if (expr != null && expr.isLiteralText()) {
            _itemDescription = String.valueOf(expr.getValue(null));
            return;
          }
          else
            _itemDescriptionExpr = expr;
          break;
  
        case ITEM_DISABLED:
          if (expr != null && expr.isLiteralText()) {
            _itemDisabled = Util.booleanValueOf(expr.getValue(null));
            return;
          }
          else
            _itemDisabledExpr = expr;
          break;
  
        case ITEM_ESCAPED:
          if (expr != null && expr.isLiteralText()) {
            _itemEscaped = Util.booleanValueOf(expr.getValue(null));
            return;
          }
          else
            _itemEscapedExpr = expr;
          break;
  
        case ITEM_LABEL:
  