public abstract class LanguageSupport extends Object implements org.apache.camel.spi.Language, org.apache.camel.IsSingleton, org.apache.camel.CamelContextAware
Language implementations.| Constructor and Description |
|---|
LanguageSupport() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.CamelContext |
getCamelContext() |
static boolean |
hasSimpleFunction(String expression)
Does the expression include a simple function.
|
boolean |
isSingleton() |
protected String |
loadResource(String expression)
Loads the resource if the given expression is referring to an external resource by using the syntax
resource:scheme:uri.
|
protected <T> T |
property(Class<T> type,
Object[] properties,
int index,
Object defaultValue)
Converts the property to the expected type
|
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final String RESOURCE
public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic boolean isSingleton()
isSingleton in interface org.apache.camel.IsSingletonprotected String loadResource(String expression) throws org.apache.camel.ExpressionIllegalSyntaxException
expression - the expressionorg.apache.camel.ExpressionIllegalSyntaxException - is thrown if error loading the resourcepublic static boolean hasSimpleFunction(String expression)
expression - the expressionprotected <T> T property(Class<T> type, Object[] properties, int index, Object defaultValue)
type - the expected typeproperties - the options (optimized as object array with hardcoded positions for properties)index - index of the propertydefaultValue - optional default valueApache Camel