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.
|
protected boolean |
isDynamicResource(String expression)
Does the expression refer to a dynamic resource which uses simple functions.
|
boolean |
isSingleton() |
protected boolean |
isStaticResource(String expression)
Does the expression refer to a static resource.
|
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, wait
public static final String RESOURCE
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
protected String loadResource(String expression) throws org.apache.camel.ExpressionIllegalSyntaxException
expression
- the expressionorg.apache.camel.ExpressionIllegalSyntaxException
- is thrown if error loading the resourceprotected boolean isStaticResource(String expression)
protected boolean isDynamicResource(String expression)
public 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