public interface BeanIntrospection extends StaticService, AfterPropertiesConfigured
org.apache.camel.support.PropertyBindingSupport
instead.Modifier and Type | Interface and Description |
---|---|
static class |
BeanIntrospection.ClassInfo
Structure of an introspected class.
|
static class |
BeanIntrospection.MethodInfo
Structure of an introspected method.
|
Modifier and Type | Method and Description |
---|---|
BeanIntrospection.ClassInfo |
cacheClass(Class<?> clazz)
Introspects the given class.
|
void |
clearCache()
Clears the introspection cache.
|
Set<Method> |
findSetterMethods(Class<?> clazz,
String name,
boolean allowBuilderPattern,
boolean allowPrivateSetter,
boolean ignoreCase)
Find all the setter methods on the class
|
long |
getCachedClassesCounter()
Number of classes in the introspection cache.
|
long |
getInvokedCounter()
Number of times bean introspection has been invoked
|
LoggingLevel |
getLoggingLevel()
Logging level used for logging introspection usage.
|
Object |
getOrElseProperty(Object target,
String propertyName,
Object defaultValue,
boolean ignoreCase)
Gets the property or else returning the default value.
|
boolean |
getProperties(Object target,
Map<String,Object> properties,
String optionPrefix)
Will inspect the target for properties.
|
boolean |
getProperties(Object target,
Map<String,Object> properties,
String optionPrefix,
boolean includeNull)
Will inspect the target for properties.
|
Method |
getPropertyGetter(Class<?> type,
String propertyName,
boolean ignoreCase)
Gets the getter method for the property.
|
boolean |
isExtendedStatistics()
Whether to gather extended statistics for introspection usage.
|
void |
resetCounters()
Reset the statistics counters.
|
void |
setExtendedStatistics(boolean extendedStatistics)
Whether to gather extended statistics for introspection usage.
|
void |
setLoggingLevel(LoggingLevel loggingLevel)
Logging level used for logging introspection usage.
|
boolean |
setProperty(CamelContext context,
Object target,
String name,
Object value)
This method supports three modes to set a property:
1.
|
boolean |
setProperty(CamelContext context,
TypeConverter typeConverter,
Object target,
String name,
Object value,
String refName,
boolean allowBuilderPattern,
boolean allowPrivateSetter,
boolean ignoreCase)
This method supports three modes to set a property:
1.
|
afterPropertiesConfigured
long getInvokedCounter()
void resetCounters()
boolean isExtendedStatistics()
void setExtendedStatistics(boolean extendedStatistics)
LoggingLevel getLoggingLevel()
void setLoggingLevel(LoggingLevel loggingLevel)
boolean getProperties(Object target, Map<String,Object> properties, String optionPrefix)
target
- the target beanproperties
- the map to fill in found propertiesoptionPrefix
- an optional prefix to append the property keyboolean getProperties(Object target, Map<String,Object> properties, String optionPrefix, boolean includeNull)
target
- the target beanproperties
- the map to fill in found propertiesoptionPrefix
- an optional prefix to append the property keyincludeNull
- whether to include null valuesBeanIntrospection.ClassInfo cacheClass(Class<?> clazz)
clazz
- the classBeanIntrospection.ClassInfo
structure.void clearCache()
long getCachedClassesCounter()
Object getOrElseProperty(Object target, String propertyName, Object defaultValue, boolean ignoreCase)
target
- the target beanpropertyName
- the property namedefaultValue
- the default valueignoreCase
- whether to ignore case for matching the property nameMethod getPropertyGetter(Class<?> type, String propertyName, boolean ignoreCase) throws NoSuchMethodException
type
- the target classpropertyName
- the property nameignoreCase
- whether to ignore case for matching the property nameNoSuchMethodException
- is thrown if there are no getter method for the propertyboolean setProperty(CamelContext context, Object target, String name, Object value) throws Exception
context
and refName
are NULL and value
is non-NULL.
3. Setting a property that has not yet been resolved, the property will be resolved based on the suitable methods
found matching the property name on the target
bean. For this mode to be triggered the parameters
context
and refName
must NOT be NULL, and value
MUST be NULL.Exception
boolean setProperty(CamelContext context, TypeConverter typeConverter, Object target, String name, Object value, String refName, boolean allowBuilderPattern, boolean allowPrivateSetter, boolean ignoreCase) throws Exception
context
and refName
are NULL and value
is non-NULL.
3. Setting a property that has not yet been resolved, the property will be resolved based on the suitable methods
found matching the property name on the target
bean. For this mode to be triggered the parameters
context
and refName
must NOT be NULL, and value
MUST be NULL.Exception
Apache Camel