public MethodDescriptor [ ] getTeaContextMethodDescriptors ( Class < ? > contextClass , boolean specifiedClassOnly ) { Vector < MethodDescriptor > v = new Vector < MethodDescriptor > ( ) ; MethodDescriptor [ ] methodDescriptors = null ; try { BeanInfo beanInfo = getBeanInfo ( contextClass ) ; methodDescriptors = beanInfo . getMethodDescriptors ( ) ; } catch ( Throwable e ) { e . printStackTrace ( ) ; } if ( methodDescriptors != null ) { Method [ ] methods = contextClass . getMethods ( ) ; if ( methods . length > methodDescriptors . length ) { methodDescriptors = addMissingContextMethodDescriptors ( methods , methodDescriptors ) ; } for ( int i = 0 ; i < methodDescriptors . length ; i ++ ) { MethodDescriptor md = methodDescriptors [ i ] ; Class < ? > declaringClass = md . getMethod ( ) . getDeclaringClass ( ) ; if ( declaringClass != Object . class && ! md . isHidden ( ) && ( ! specifiedClassOnly || declaringClass == contextClass ) ) { v . addElement ( md ) ; } } } methodDescriptors = new MethodDescriptor [ v . size ( ) ] ; v . copyInto ( methodDescriptors ) ; sortMethodDescriptors ( methodDescriptors ) ; return methodDescriptors ; }
Gets the MethodDescriptors of the specified context class