(ProceedingJoinPoint joinPoint)
| 104 | // } |
| 105 | |
| 106 | private Map<String, Object> getNameAndValue(ProceedingJoinPoint joinPoint) { |
| 107 | final Signature signature = joinPoint.getSignature(); |
| 108 | MethodSignature methodSignature = (MethodSignature) signature; |
| 109 | final String[] names = methodSignature.getParameterNames(); |
| 110 | final Object[] args = joinPoint.getArgs(); |
| 111 | |
| 112 | if (ArrayUtil.isEmpty(names) || ArrayUtil.isEmpty(args)) { |
| 113 | return Collections.emptyMap(); |
| 114 | } |
| 115 | if (names.length != args.length) { |
| 116 | log.warn("{}方法参数名和参数值数量不一致", methodSignature.getName()); |
| 117 | return Collections.emptyMap(); |
| 118 | } |
| 119 | Map<String, Object> map = Maps.newHashMap(); |
| 120 | for (int i = 0; i < names.length; i++) { |
| 121 | map.put(names[i], args[i]); |
| 122 | } |
| 123 | return map; |
| 124 | } |
| 125 | |
| 126 | private static final String UNKNOWN = "unknown"; |
| 127 |
nothing calls this directly
no outgoing calls
no test coverage detected