Package org.apache.commons.el
Class StringLiteral
- java.lang.Object
-
- org.apache.commons.el.Expression
-
- org.apache.commons.el.Literal
-
- org.apache.commons.el.StringLiteral
-
public class StringLiteral extends Literal
An expression representing a String literal value.
- Version:
- $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: luehe $
- Author:
- Nathan Abramson - Art Technology Group
-
-
Constructor Summary
Constructors Constructor Description StringLiteral(java.lang.Object pValue)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringLiteralfromLiteralValue(java.lang.String pValue)Returns a StringLiteral with the given string valuestatic StringLiteralfromToken(java.lang.String pToken)Returns a StringLiteral parsed from the given token (enclosed by single or double quotes)java.lang.StringgetExpressionString()Returns the expression in the expression language syntaxstatic java.lang.StringgetValueFromToken(java.lang.String pToken)Parses the given token into the literal value(package private) static booleanisJavaIdentifier(java.lang.String pValue)Returns true if the specified value is a legal java identifierstatic java.lang.StringtoIdentifierToken(java.lang.String pValue)Converts the specified value to an identifier token, escaping it as a string literal if necessary.static java.lang.StringtoStringToken(java.lang.String pValue)Converts the specified value to a String token, using " as the enclosing quotes and escaping any characters that need escaping.
-
-
-
Method Detail
-
fromToken
public static StringLiteral fromToken(java.lang.String pToken)
Returns a StringLiteral parsed from the given token (enclosed by single or double quotes)
-
fromLiteralValue
public static StringLiteral fromLiteralValue(java.lang.String pValue)
Returns a StringLiteral with the given string value
-
getValueFromToken
public static java.lang.String getValueFromToken(java.lang.String pToken)
Parses the given token into the literal value
-
toStringToken
public static java.lang.String toStringToken(java.lang.String pValue)
Converts the specified value to a String token, using " as the enclosing quotes and escaping any characters that need escaping.
-
toIdentifierToken
public static java.lang.String toIdentifierToken(java.lang.String pValue)
Converts the specified value to an identifier token, escaping it as a string literal if necessary.
-
isJavaIdentifier
static boolean isJavaIdentifier(java.lang.String pValue)
Returns true if the specified value is a legal java identifier
-
getExpressionString
public java.lang.String getExpressionString()
Returns the expression in the expression language syntax- Specified by:
getExpressionStringin classExpression
-
-