= #JxnPortable/docs/programmer_examples/demos/PrintPublicMethodsOfClass~Demo.jxn
!
! Prints sorted list of the public methods of a class to disk file
!
clsName = javax.swing.JOptionPane.showInputDialog( "Please enter [package_path.]class_name e.g.", "java.awt.Color" )
cls = Class.forName clsName
! ma = cls.getDeclaredMethods()
ma = cls.getMethods()
sa = ma.getName() + "\t" + ma
Arrays.sort sa
!
filename = cls.getSimpleName() + "_public_methods.log"
ps = @PrintStream( filename )
print( ps, sa )  ! or ps.println @JxnUnroll sa
ps.println( length ma + " public methods from " + cls.getName() + ".class.getMethods()" )
ps.close()
javax.swing.JOptionPane.showMessageDialog( @Frame(), "see file: " + filename )
! or try: #edit sa