Package org.sqlproc.engine.plugin
Class CommonsBeanUtilsPlugin
java.lang.Object
org.sqlproc.engine.plugin.CommonsBeanUtilsPlugin
- All Implemented Interfaces:
BeanUtilsPlugin
Bean utilities implementation based on Apache commons library.
- Author:
- Vladimir Hudec
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sqlproc.engine.plugin.BeanUtilsPlugin
BeanUtilsPlugin.GetterType -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final org.slf4j.LoggerThe internal slf4j logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringattrTypes2String(Class<?>... attrTypes) booleancheckAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName) booleancheckMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Class<?>... argTypes) booleancheckMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) protected Stringprotected StringgetAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName) protected PropertyDescriptorgetAttributeDescriptor(Class<?> clazz, String attrName) Class<?>[]getAttributeParameterizedTypes(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName) Class<?> getAttributeType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName) Class<?> getEnumToClass(SqlRuntimeContext runtimeCtx, Class<?> clazz) getEnumToValue(SqlRuntimeContext runtimeCtx, Object bean) protected MethodgetGetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck) getGetterType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName) getGetterType(SqlRuntimeContext runtimeCtx, Object bean, String attrName) getInstance(SqlRuntimeContext runtimeCtx, Class<?> clazz) protected MethodgetSetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck, Class<?>... attrTypes) protected MethodgetSetter(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Class<?>... attrTypes) getValueToEnum(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object val) protected ObjectinvokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object bean, String methodName, Object... args) invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Object... args) protected ObjectinvokeMethod(SqlRuntimeContext runtimeCtx, Object bean, Method method, Object... args) invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) voidsetAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue) booleansimpleSetAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue, Class<?>... attrTypes) protected Object[]protected Class<?>[]toParameterTypes(Object arg) protected Class<?>[]toParameterTypes(Object[] args)
-
Field Details
-
logger
final org.slf4j.Logger loggerThe internal slf4j logger.
-
-
Constructor Details
-
CommonsBeanUtilsPlugin
public CommonsBeanUtilsPlugin()
-
-
Method Details
-
getInstance
- Specified by:
getInstancein interfaceBeanUtilsPlugin
-
getAttributeDescriptor
-
getAttributeType
- Specified by:
getAttributeTypein interfaceBeanUtilsPlugin
-
getAttributeParameterizedTypes
public Class<?>[] getAttributeParameterizedTypes(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName) - Specified by:
getAttributeParameterizedTypesin interfaceBeanUtilsPlugin
-
getGetter
protected Method getGetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck) -
getGetterType
public BeanUtilsPlugin.GetterType getGetterType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName) - Specified by:
getGetterTypein interfaceBeanUtilsPlugin
-
getGetterType
public BeanUtilsPlugin.GetterType getGetterType(SqlRuntimeContext runtimeCtx, Object bean, String attrName) - Specified by:
getGetterTypein interfaceBeanUtilsPlugin
-
checkAttribute
- Specified by:
checkAttributein interfaceBeanUtilsPlugin
-
getAttribute
public Object getAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName) throws SqlRuntimeException - Specified by:
getAttributein interfaceBeanUtilsPlugin- Throws:
SqlRuntimeException
-
getSetter
protected Method getSetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck, Class<?>... attrTypes) -
getSetter
protected Method getSetter(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Class<?>... attrTypes) -
simpleSetAttribute
public boolean simpleSetAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue, Class<?>... attrTypes) - Specified by:
simpleSetAttributein interfaceBeanUtilsPlugin
-
setAttribute
public void setAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue) throws SqlRuntimeException - Specified by:
setAttributein interfaceBeanUtilsPlugin- Throws:
SqlRuntimeException
-
invokeMethod
protected Object invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, Method method, Object... args) throws SqlRuntimeException - Throws:
SqlRuntimeException
-
checkMethod
public boolean checkMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Class<?>... argTypes) - Specified by:
checkMethodin interfaceBeanUtilsPlugin
-
checkMethod
public boolean checkMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) - Specified by:
checkMethodin interfaceBeanUtilsPlugin
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Object... args) throws SqlRuntimeException - Specified by:
invokeMethodin interfaceBeanUtilsPlugin- Throws:
SqlRuntimeException
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) throws SqlRuntimeException - Specified by:
invokeMethodin interfaceBeanUtilsPlugin- Throws:
SqlRuntimeException
-
invokeMethod
protected Object invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object bean, String methodName, Object... args) throws SqlRuntimeException - Throws:
SqlRuntimeException
-
getEnumToValue
- Specified by:
getEnumToValuein interfaceBeanUtilsPlugin
-
getEnumToClass
- Specified by:
getEnumToClassin interfaceBeanUtilsPlugin
-
getValueToEnum
- Specified by:
getValueToEnumin interfaceBeanUtilsPlugin
-
attrTypes2String
-
toArray
-
toParameterTypes
-
toParameterTypes
-
debugInfo
-
debugInfo
-