BeanIntrospection
@Deprecated public final class IntrospectionSupport extends Object
stop()
method when CamelContext
is
being stopped. This allows to clear the introspection cache.
This implementation will skip methods from java.lang.Object and java.lang.reflect.Proxy.
This implementation will use a cache when the getProperties(Object, java.util.Map, String)
method is being
used. Also the cacheClass(Class)
method gives access to the introspect cache.Modifier and Type | Method and Description |
---|---|
static org.apache.camel.spi.BeanIntrospection.ClassInfo |
cacheClass(Class<?> clazz)
Deprecated.
Introspects the given class.
|
static void |
clearCache()
Deprecated.
Clears the introspection cache.
|
static Map<String,Object> |
extractProperties(Map<String,Object> properties,
String optionPrefix)
Deprecated.
use
PropertiesHelper |
static Map<String,Object> |
extractProperties(Map<String,Object> properties,
String optionPrefix,
boolean remove)
Deprecated.
use
PropertiesHelper |
static Map<String,String> |
extractStringProperties(Map<String,Object> properties)
Deprecated.
use
PropertiesHelper |
static Set<Method> |
findSetterMethods(Class<?> clazz,
String name,
boolean allowBuilderPattern,
boolean allowPrivateSetter,
boolean ignoreCase)
Deprecated.
|
static long |
getCacheCounter()
Deprecated.
|
static String |
getGetterShorthandName(Method method)
Deprecated.
|
static Map<String,Object> |
getNonNullProperties(Object target)
Deprecated.
Will inspect the target for properties.
|
static Object |
getOrElseProperty(Object target,
String propertyName,
Object defaultValue)
Deprecated.
|
static Object |
getOrElseProperty(Object target,
String propertyName,
Object defaultValue,
boolean ignoreCase)
Deprecated.
|
static boolean |
getProperties(Object target,
Map<String,Object> properties,
String optionPrefix)
Deprecated.
Will inspect the target for properties.
|
static boolean |
getProperties(Object target,
Map<String,Object> properties,
String optionPrefix,
boolean includeNull)
Deprecated.
Will inspect the target for properties.
|
static Object |
getProperty(Object target,
String propertyName)
Deprecated.
|
static Method |
getPropertyGetter(Class<?> type,
String propertyName)
Deprecated.
|
static Method |
getPropertyGetter(Class<?> type,
String propertyName,
boolean ignoreCase)
Deprecated.
|
static Method |
getPropertySetter(Class<?> type,
String propertyName)
Deprecated.
|
static String |
getSetterShorthandName(Method method)
Deprecated.
|
static boolean |
hasProperties(Map<String,Object> properties,
String optionPrefix)
Deprecated.
use
PropertiesHelper |
static boolean |
isGetter(Method method)
Deprecated.
|
static boolean |
isPropertyIsGetter(Class<?> type,
String propertyName)
Deprecated.
|
static boolean |
isSetter(Method method)
Deprecated.
|
static boolean |
isSetter(Method method,
boolean allowBuilderPattern)
Deprecated.
|
static boolean |
setProperties(org.apache.camel.CamelContext context,
org.apache.camel.TypeConverter typeConverter,
Object target,
Map<String,Object> properties)
Deprecated.
|
static boolean |
setProperties(Object target,
Map<String,Object> properties)
Deprecated.
|
static boolean |
setProperties(Object target,
Map<String,Object> properties,
String optionPrefix)
Deprecated.
|
static boolean |
setProperties(Object target,
Map<String,Object> properties,
String optionPrefix,
boolean allowBuilderPattern)
Deprecated.
|
static boolean |
setProperties(org.apache.camel.TypeConverter typeConverter,
Object target,
Map<String,Object> properties)
Deprecated.
|
static boolean |
setProperty(org.apache.camel.CamelContext context,
Object target,
String name,
Object value)
Deprecated.
|
static boolean |
setProperty(org.apache.camel.CamelContext context,
org.apache.camel.TypeConverter typeConverter,
Object target,
String name,
Object value)
Deprecated.
|
static boolean |
setProperty(org.apache.camel.CamelContext context,
org.apache.camel.TypeConverter typeConverter,
Object target,
String name,
Object value,
String refName,
boolean allowBuilderPattern)
Deprecated.
This method supports three modes to set a property:
1.
|
static boolean |
setProperty(org.apache.camel.CamelContext context,
org.apache.camel.TypeConverter typeConverter,
Object target,
String name,
Object value,
String refName,
boolean allowBuilderPattern,
boolean allowPrivateSetter,
boolean ignoreCase)
Deprecated.
This method supports three modes to set a property:
1.
|
static boolean |
setProperty(Object target,
String name,
Object value)
Deprecated.
|
static boolean |
setProperty(Object target,
String name,
Object value,
boolean allowBuilderPattern)
Deprecated.
|
static boolean |
setProperty(org.apache.camel.TypeConverter typeConverter,
Object target,
String name,
Object value)
Deprecated.
|
static void |
stop()
Deprecated.
CamelContext should call this stop method when its stopping. |
public static void stop()
CamelContext
should call this stop method when its stopping.
This implementation will clear its introspection cache.public static void clearCache()
public static long getCacheCounter()
public static boolean isGetter(Method method)
public static boolean isSetter(Method method, boolean allowBuilderPattern)
public static boolean isSetter(Method method)
public static Map<String,Object> getNonNullProperties(Object target)
target
- the target beanpublic static 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 keypublic static boolean 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 valuespublic static org.apache.camel.spi.BeanIntrospection.ClassInfo cacheClass(Class<?> clazz)
clazz
- the classBeanIntrospection.ClassInfo
structure.@Deprecated public static boolean hasProperties(Map<String,Object> properties, String optionPrefix)
PropertiesHelper
public static Object getProperty(Object target, String propertyName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
public static Object getOrElseProperty(Object target, String propertyName, Object defaultValue)
public static Object getOrElseProperty(Object target, String propertyName, Object defaultValue, boolean ignoreCase)
public static Method getPropertyGetter(Class<?> type, String propertyName) throws NoSuchMethodException
NoSuchMethodException
public static Method getPropertyGetter(Class<?> type, String propertyName, boolean ignoreCase) throws NoSuchMethodException
NoSuchMethodException
public static Method getPropertySetter(Class<?> type, String propertyName) throws NoSuchMethodException
NoSuchMethodException
public static boolean isPropertyIsGetter(Class<?> type, String propertyName)
@Deprecated public static boolean setProperties(Object target, Map<String,Object> properties, String optionPrefix, boolean allowBuilderPattern) throws Exception
PropertyBindingSupport
Exception
@Deprecated public static boolean setProperties(Object target, Map<String,Object> properties, String optionPrefix) throws Exception
PropertyBindingSupport
Exception
@Deprecated public static Map<String,Object> extractProperties(Map<String,Object> properties, String optionPrefix)
PropertiesHelper
@Deprecated public static Map<String,Object> extractProperties(Map<String,Object> properties, String optionPrefix, boolean remove)
PropertiesHelper
@Deprecated public static Map<String,String> extractStringProperties(Map<String,Object> properties)
PropertiesHelper
@Deprecated public static boolean setProperties(org.apache.camel.CamelContext context, org.apache.camel.TypeConverter typeConverter, Object target, Map<String,Object> properties) throws Exception
PropertyBindingSupport
Exception
@Deprecated public static boolean setProperties(org.apache.camel.TypeConverter typeConverter, Object target, Map<String,Object> properties) throws Exception
PropertyBindingSupport
Exception
@Deprecated public static boolean setProperties(Object target, Map<String,Object> properties) throws Exception
PropertyBindingSupport
Exception
public static boolean setProperty(org.apache.camel.CamelContext context, org.apache.camel.TypeConverter typeConverter, Object target, String name, Object value, String refName, boolean allowBuilderPattern) 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
public static boolean setProperty(org.apache.camel.CamelContext context, org.apache.camel.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
public static boolean setProperty(org.apache.camel.CamelContext context, Object target, String name, Object value) throws Exception
Exception
public static boolean setProperty(org.apache.camel.CamelContext context, org.apache.camel.TypeConverter typeConverter, Object target, String name, Object value) throws Exception
Exception
public static boolean setProperty(org.apache.camel.TypeConverter typeConverter, Object target, String name, Object value) throws Exception
Exception
@Deprecated public static boolean setProperty(Object target, String name, Object value, boolean allowBuilderPattern) throws Exception
Exception
@Deprecated public static boolean setProperty(Object target, String name, Object value) throws Exception
Exception
Apache Camel