FileDocCategorySizeDatePackage
ComplexValue.javaAPI DocGlassfish v2 API4506Sat May 05 19:17:26 BST 2007org.apache.taglibs.standard.lang.jstl

ComplexValue

public class ComplexValue extends Expression

Represents a dynamic value, which consists of a prefix and an optional set of ValueSuffix elements. A prefix is something like an identifier, and a suffix is something like a "property of" or "indexed element of" operator.

author
Nathan Abramson - Art Technology Group
author
Shawn Bayern
version
$Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: tcfujii $

Fields Summary
Expression
mPrefix
List
mSuffixes
Constructors Summary
public ComplexValue(Expression pPrefix, List pSuffixes)
Constructor

    mPrefix = pPrefix;
    mSuffixes = pSuffixes;
  
Methods Summary
public java.lang.Objectevaluate(java.lang.Object pContext, VariableResolver pResolver, java.util.Map functions, java.lang.String defaultPrefix, Logger pLogger)
Evaluates by evaluating the prefix, then applying the suffixes

    Object ret = mPrefix.evaluate (pContext, pResolver, functions,
				   defaultPrefix, pLogger);

    // Apply the suffixes
    for (int i = 0; mSuffixes != null && i < mSuffixes.size (); i++) {
      ValueSuffix suffix = (ValueSuffix) mSuffixes.get (i);
      ret = suffix.evaluate (ret, pContext, pResolver, functions,
			     defaultPrefix, pLogger);
    }

    return ret;
  
public java.lang.StringgetExpressionString()
Returns the expression in the expression language syntax

    StringBuffer buf = new StringBuffer ();
    buf.append (mPrefix.getExpressionString ());

    for (int i = 0; mSuffixes != null && i < mSuffixes.size (); i++) {
      ValueSuffix suffix = (ValueSuffix) mSuffixes.get (i);
      buf.append (suffix.getExpressionString ());
    }

    return buf.toString ();
  
public ExpressiongetPrefix()

 return mPrefix; 
public java.util.ListgetSuffixes()

 return mSuffixes; 
public voidsetPrefix(Expression pPrefix)

 mPrefix = pPrefix; 
public voidsetSuffixes(java.util.List pSuffixes)

 mSuffixes = pSuffixes;