protected void maybeLoadMethods ( ) { if ( _methodMap == null ) { _methodMap = new HashMap < String , List < Member > > ( ) ; Method [ ] methods = _clazz . getMethods ( ) ; for ( int i = 0 ; i < methods . length ; ++ i ) { Method m = methods [ i ] ; String methodName = m . getName ( ) ; Class < ? > [ ] paramTypes = m . getParameterTypes ( ) ; List < Member > list = _methodMap . get ( methodName ) ; if ( list == null ) { list = new ArrayList < Member > ( ) ; _methodMap . put ( methodName , list ) ; } if ( ! ClassUtil . classIsAccessible ( _clazz ) ) { m = ClassUtil . getAccessibleMethodFrom ( _clazz , methodName , paramTypes ) ; } if ( m != null ) { list . add ( m ) ; _paramMap . put ( m , paramTypes ) ; } } } }
Loads up the data structures for my target class s methods .