protected MethodDescriptor [ ] addMissingContextMethodDescriptors ( Method [ ] methods , MethodDescriptor [ ] methodDescriptors ) { List < Method > methodNames = new ArrayList < Method > ( methodDescriptors . length ) ; Vector < MethodDescriptor > mds = new Vector < MethodDescriptor > ( methods . length ) ; for ( int i = 0 ; i < methodDescriptors . length ; i ++ ) { methodNames . add ( methodDescriptors [ i ] . getMethod ( ) ) ; mds . add ( methodDescriptors [ i ] ) ; } for ( int i = 0 ; i < methods . length ; i ++ ) { if ( ! methodNames . contains ( methods [ i ] ) ) { mds . add ( new MethodDescriptor ( methods [ i ] ) ) ; } } methodDescriptors = new MethodDescriptor [ mds . size ( ) ] ; mds . copyInto ( methodDescriptors ) ; return methodDescriptors ; }
Works around a bug in java . beans . Introspector where sub - interfaces do not return their parent s methods in the method descriptor array .