1515 */
1616package org .apache .ibatis .reflection ;
1717
18- import org .apache .ibatis .reflection .invoker .AmbiguousMethodInvoker ;
19- import org .apache .ibatis .reflection .invoker .GetFieldInvoker ;
20- import org .apache .ibatis .reflection .invoker .Invoker ;
21- import org .apache .ibatis .reflection .invoker .MethodInvoker ;
22- import org .apache .ibatis .reflection .invoker .SetFieldInvoker ;
23- import org .apache .ibatis .reflection .property .PropertyNamer ;
24- import org .apache .ibatis .util .MapUtil ;
25-
2618import java .lang .reflect .Array ;
2719import java .lang .reflect .Constructor ;
2820import java .lang .reflect .Field ;
4234import java .util .Map ;
4335import java .util .Map .Entry ;
4436
37+ import org .apache .ibatis .reflection .invoker .AmbiguousMethodInvoker ;
38+ import org .apache .ibatis .reflection .invoker .GetFieldInvoker ;
39+ import org .apache .ibatis .reflection .invoker .Invoker ;
40+ import org .apache .ibatis .reflection .invoker .MethodInvoker ;
41+ import org .apache .ibatis .reflection .invoker .SetFieldInvoker ;
42+ import org .apache .ibatis .reflection .property .PropertyNamer ;
43+ import org .apache .ibatis .util .MapUtil ;
44+
4545/**
4646 * This class represents a cached set of class definition information that
4747 * allows for easy mapping between property names and getter/setter methods.
@@ -64,9 +64,9 @@ public class Reflector {
6464 public Reflector (Class <?> clazz ) {
6565 type = clazz ;
6666 addDefaultConstructor (clazz );
67- Method [] allMethods = getClassMethods (clazz );
68- addGetMethods (allMethods );
69- addSetMethods (allMethods );
67+ Method [] classMethods = getClassMethods (clazz );
68+ addGetMethods (classMethods );
69+ addSetMethods (classMethods );
7070 addFields (clazz );
7171 readablePropertyNames = getMethods .keySet ().toArray (new String [0 ]);
7272 writablePropertyNames = setMethods .keySet ().toArray (new String [0 ]);
@@ -289,6 +289,7 @@ private Method[] getClassMethods(Class<?> clazz) {
289289 }
290290
291291 Collection <Method > methods = uniqueMethods .values ();
292+
292293 return methods .toArray (new Method [0 ]);
293294 }
294295
0 commit comments