Class ELText
- java.lang.Object
- 
- org.apache.myfaces.view.facelets.el.ELText
 
- 
- Direct Known Subclasses:
- ELText.ELCacheableTextVariable,- ELText.ELTextComposite,- ELText.ELTextVariable
 
 public class ELText extends Object Handles parsing EL Strings in accordance with the EL-API Specification. The parser accepts either${..}or#{..}.- Version:
- $Id$
- Author:
- Jacob Hookom
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classELText.ELCacheableTextVariableprotected static classELText.ELTextCompositeprotected static classELText.ELTextVariableprotected static classELText.LiteralValueExpression
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ELTextapply(jakarta.el.ExpressionFactory factory, jakarta.el.ELContext ctx)Return an instance ofthisthat is applicable given the ELContext and ExpressionFactory state.booleanisLiteral()If it's literal textstatic booleanisLiteral(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in)static booleanisLiteral(String in)Parses the passed string to determine if it's literal or notstatic ELTextparse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in)static ELTextparse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in, Location location)Factory method for creating a validated ELText instance.static ELTextparse(String in)static ELTextparse(String in, Location location)Factory method for creating an unvalidated ELText instance.static ELTextparseAllowEmptyString(String in, Location location)static ELText[]parseAsArray(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in, Location location)static ELText[]parseAsArray(String in, Location location)static StringparseAsString(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in)StringtoString()StringtoString(jakarta.el.ELContext ctx)Evaluates the ELText to a Stringvoidwrite(Writer out, jakarta.el.ELContext ctx)Allow this instance to write to the passed Writer, given the ELContext statevoidwriteText(ResponseWriter out, jakarta.el.ELContext ctx)
 
- 
- 
- 
Field Detail- 
literalprotected final String literal 
 
- 
 - 
Constructor Detail- 
ELTextpublic ELText(String literal) 
 
- 
 - 
Method Detail- 
isLiteralpublic boolean isLiteral() If it's literal text- Returns:
- true if the String is literal (doesn't contain #{..}or${..})
 
 - 
applypublic ELText apply(jakarta.el.ExpressionFactory factory, jakarta.el.ELContext ctx) Return an instance ofthisthat is applicable given the ELContext and ExpressionFactory state.- Parameters:
- factory- the ExpressionFactory to use
- ctx- the ELContext to use
- Returns:
- an ELText instance
 
 - 
writepublic void write(Writer out, jakarta.el.ELContext ctx) throws jakarta.el.ELException, IOException Allow this instance to write to the passed Writer, given the ELContext state- Parameters:
- out- Writer to write to
- ctx- current ELContext state
- Throws:
- jakarta.el.ELException
- IOException
 
 - 
writeTextpublic void writeText(ResponseWriter out, jakarta.el.ELContext ctx) throws jakarta.el.ELException, IOException - Throws:
- jakarta.el.ELException
- IOException
 
 - 
toStringpublic String toString(jakarta.el.ELContext ctx) throws jakarta.el.ELException Evaluates the ELText to a String- Parameters:
- ctx- current ELContext state
- Returns:
- the evaluated String
- Throws:
- jakarta.el.ELException
 
 - 
isLiteralpublic static boolean isLiteral(String in) Parses the passed string to determine if it's literal or not- Parameters:
- in- input String
- Returns:
- true if the String is literal (doesn't contain #{..}or${..})
 
 - 
parsepublic static ELText parse(String in) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
parsepublic static ELText parse(String in, Location location) throws jakarta.el.ELException Factory method for creating an unvalidated ELText instance. NOTE: All expressions in the passed String are treated asLocationValueExpression.- Parameters:
- in- String to parse
- location- The location
- Returns:
- ELText instance that knows if the String was literal or not
- Throws:
- jakarta.el.ELException
 
 - 
parseAllowEmptyStringpublic static ELText parseAllowEmptyString(String in, Location location) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
parseAsStringpublic static String parseAsString(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
parsepublic static ELText parse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
parsepublic static ELText parse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in, Location location) throws jakarta.el.ELException Factory method for creating a validated ELText instance. When an Expression is hit, it will use the ExpressionFactory to create a ValueExpression instance, resolving any functions at that time.Variables and properties will not be evaluated. - Parameters:
- fact- ExpressionFactory to use
- ctx- ELContext to validate against
- in- String to parse
- location- The location
- Returns:
- ELText that can be re-applied later
- Throws:
- jakarta.el.ELException
 
 - 
parseAsArraypublic static ELText[] parseAsArray(String in, Location location) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
parseAsArraypublic static ELText[] parseAsArray(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in, Location location) throws jakarta.el.ELException - Throws:
- jakarta.el.ELException
 
 - 
isLiteralpublic static boolean isLiteral(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in) throws jakarta.el.ELException- Throws:
- jakarta.el.ELException
 
 
- 
 
-