Package com.sun.faces.facelets.el
Class ELText
java.lang.Object
com.sun.faces.facelets.el.ELText
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
-
Field Summary
-
Constructor Summary
-
Method Summary
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(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, String alias)Factory method for creating a validated ELText instance.static ELTextparse(String in)Factory method for creating an unvalidated ELText instance.static ELTextparse(String in, String alias)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 Details
-
Constructor Details
-
Method Details
-
isLiteral
public boolean isLiteral()If it's literal text- Returns:
- true if the String is literal (doesn't contain
#{..}or${..})
-
apply
Return an instance ofthisthat is applicable given the ELContext and ExpressionFactory state.- Parameters:
factory- the ExpressionFactory to usectx- the ELContext to use- Returns:
- an ELText instance
-
write
Allow this instance to write to the passed Writer, given the ELContext state- Parameters:
out- Writer to write toctx- current ELContext state- Throws:
jakarta.el.ELExceptionIOException
-
writeText
public void writeText(ResponseWriter out, jakarta.el.ELContext ctx) throws jakarta.el.ELException, IOException- Throws:
jakarta.el.ELExceptionIOException
-
toString
Evaluates the ELText to a String- Parameters:
ctx- current ELContext state- Returns:
- the evaluated String
- Throws:
jakarta.el.ELException
-
toString
-
isLiteral
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${..})
-
parse
Factory method for creating an unvalidated ELText instance. NOTE: All expressions in the passed String are treated asELText.LiteralValueExpression, with one exception: composite component expressions. These are treated as ContextualCompositeValueExpressions.- Parameters:
in- String to parse- Returns:
- ELText instance that knows if the String was literal or not
- Throws:
jakarta.el.ELException
-
parse
- Throws:
jakarta.el.ELException
-
parse
public static ELText parse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in) throws jakarta.el.ELException- Throws:
jakarta.el.ELException
-
parse
public static ELText parse(jakarta.el.ExpressionFactory fact, jakarta.el.ELContext ctx, String in, String alias) throws jakarta.el.ELExceptionFactory 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 usectx- ELContext to validate againstin- String to parse- Returns:
- ELText that can be re-applied later
- Throws:
jakarta.el.ELException
-