Package org.apache.ibatis.reflection
Class ParamNameResolver
- java.lang.Object
 - 
- org.apache.ibatis.reflection.ParamNameResolver
 
 
- 
public class ParamNameResolver extends Object
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringGENERIC_NAME_PREFIX 
- 
Constructor Summary
Constructors Constructor Description ParamNameResolver(Configuration config, Method method) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetNamedParams(Object[] args)A single non-special parameter is returned without a name.String[]getNames()Returns parameter names referenced by SQL providers.static ObjectwrapToMapIfCollection(Object object, String actualParamName)Wrap to aMapperMethod.ParamMapif object isCollectionor array. 
 - 
 
- 
- 
Field Detail
- 
GENERIC_NAME_PREFIX
public static final String GENERIC_NAME_PREFIX
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ParamNameResolver
public ParamNameResolver(Configuration config, Method method)
 
 - 
 
- 
Method Detail
- 
getNames
public String[] getNames()
Returns parameter names referenced by SQL providers.- Returns:
 - the names
 
 
- 
getNamedParams
public Object getNamedParams(Object[] args)
A single non-special parameter is returned without a name. Multiple parameters are named using the naming rule. In addition to the default names, this method also adds the generic names (param1, param2, ...).
- Parameters:
 args- the args- Returns:
 - the named params
 
 
- 
wrapToMapIfCollection
public static Object wrapToMapIfCollection(Object object, String actualParamName)
Wrap to aMapperMethod.ParamMapif object isCollectionor array.- Parameters:
 object- a parameter objectactualParamName- an actual parameter name (If specify a name, set an object toMapperMethod.ParamMapwith specified name)- Returns:
 - a 
MapperMethod.ParamMap - Since:
 - 3.5.5
 
 
 - 
 
 -