Skip to content

Commit

Permalink
注释
Browse files Browse the repository at this point in the history
  • Loading branch information
huifer committed Dec 9, 2019
1 parent 03558af commit 7eb0a23
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public Reflector(Class<?> clazz) {
for (String propName : writablePropertyNames) {
caseInsensitivePropertyMap.put(propName.toUpperCase(Locale.ENGLISH), propName);
}
System.out.println();
}

/**
Expand Down Expand Up @@ -144,7 +145,8 @@ private void addGetMethods(Class<?> clazz) {
}

/**
* 解决冲突
* 解决冲突,
* 找到子类的方法返回
*
* @param conflictingGetters
*/
Expand Down Expand Up @@ -199,6 +201,12 @@ private void addSetMethods(Class<?> clazz) {
resolveSetterConflicts(conflictingSetters);
}

/**
* 一个名称多个方法
* @param conflictingMethods
* @param name
* @param method
*/
private void addMethodConflict(Map<String, List<Method>> conflictingMethods, String name, Method method) {
if (isValidPropertyName(name)) {
List<Method> list = conflictingMethods.computeIfAbsent(name, k -> new ArrayList<>());
Expand Down Expand Up @@ -369,6 +377,7 @@ private void addUniqueMethods(Map<String, Method> uniqueMethods, Method[] method
// check to see if the method is already known
// if it is known, then an extended class must have
// overridden a method
// 如果存在则不添加
if (!uniqueMethods.containsKey(signature)) {
uniqueMethods.put(signature, currentMethod);
}
Expand Down

0 comments on commit 7eb0a23

Please sign in to comment.