org.apache.camel.language.simple.ast
Class LiteralExpression
java.lang.Object
org.apache.camel.language.simple.ast.BaseSimpleNode
org.apache.camel.language.simple.ast.LiteralExpression
- All Implemented Interfaces:
- LiteralNode, SimpleNode
- Direct Known Subclasses:
- SimpleFunctionExpression
public class LiteralExpression
- extends BaseSimpleNode
- implements LiteralNode
Represents literals in the AST.
text
protected StringBuilder text
LiteralExpression
public LiteralExpression(SimpleToken token)
toString
public String toString()
- Overrides:
toString
in class BaseSimpleNode
addText
public void addText(String text)
- Description copied from interface:
LiteralNode
- Adds the given text to this model.
This operation can be invoked multiple times to add more text.
- Specified by:
addText
in interface LiteralNode
- Parameters:
text
- the text to add
getText
public String getText()
- Description copied from interface:
LiteralNode
- Gets the text
- Specified by:
getText
in interface LiteralNode
- Returns:
- the text, will never be null, but may contain an empty string.
quoteEmbeddedNodes
public boolean quoteEmbeddedNodes()
- Description copied from interface:
LiteralNode
- Whether to quote embedded nodes.
Some functions such as the bean: function would need to quote its embedded nodes
as they are parameter values for method names.
- Specified by:
quoteEmbeddedNodes
in interface LiteralNode
createExpression
public Expression createExpression(String expression)
- Description copied from interface:
SimpleNode
- Creates a Camel
Expression
based on this model.
- Specified by:
createExpression
in interface SimpleNode
- Parameters:
expression
- the input string
- Returns:
- the created
Expression
Apache CAMEL