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
Represents literals in the AST.
-
Field Summary
FieldsFields inherited from class org.apache.camel.language.simple.ast.BaseSimpleNode
token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given text to this model.createCode(String expression) Creates Java code based on this model.org.apache.camel.ExpressioncreateExpression(org.apache.camel.CamelContext camelContext, String expression) Creates a CamelExpressionbased on this model.getText()Gets the textbooleanWhether to quote embedded nodes.toString()Methods inherited from class org.apache.camel.language.simple.ast.BaseSimpleNode
createCode, getTokenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.language.simple.ast.SimpleNode
getToken
-
Field Details
-
text
-
-
Constructor Details
-
LiteralExpression
-
-
Method Details
-
toString
- Overrides:
toStringin classBaseSimpleNode
-
addText
Description copied from interface:LiteralNodeAdds the given text to this model. This operation can be invoked multiple times to add more text.- Specified by:
addTextin interfaceLiteralNode- Parameters:
text- the text to add
-
getText
Description copied from interface:LiteralNodeGets the text- Specified by:
getTextin interfaceLiteralNode- Returns:
- the text, will never be null, but may contain an empty string.
-
quoteEmbeddedNodes
public boolean quoteEmbeddedNodes()Description copied from interface:LiteralNodeWhether 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:
quoteEmbeddedNodesin interfaceLiteralNode
-
createExpression
public org.apache.camel.Expression createExpression(org.apache.camel.CamelContext camelContext, String expression) Description copied from interface:SimpleNodeCreates a CamelExpressionbased on this model.- Specified by:
createExpressionin interfaceSimpleNode- Parameters:
camelContext- the camel contextexpression- the input string- Returns:
- the created
Expression
-
createCode
Description copied from interface:SimpleNodeCreates Java code based on this model.- Specified by:
createCodein interfaceSimpleNode- Parameters:
expression- the input string- Returns:
- the created Java code
- Throws:
SimpleParserException- should be thrown if error parsing the model
-