reflection getMethod

import java.lang.reflect.*;
//import java.awt.*;
import java.net.*;
import java.io.*;

public class Test_this {
static public void main( String[] args )throws IOException
{
System.out.println("----");
process_this pt = new process_this();
printName(pt);

}
static void printName(Object o) {
Class gt = o.getClass();
System.out.println("class name : " + gt.getName());
Method[] all_methods = gt.getMethods();
for (int i = 0; i < all_methods.length; i++) {
String methodString = all_methods[i].getName();
System.out.println("Method Name: " + methodString);
String returnString = all_methods[i].getReturnType().getName();
System.out.println("\tReturn Type: " + returnString);
Class[] cls_param = all_methods[i].getParameterTypes();
System.out.print("\tParameter Types:");
for (int k = 0; k < cls_param.length; k ++) {
String parameterString = cls_param[k].getName();
System.out.print(" " + parameterString);
}
System.out.println();
}
}
}

class process_this
{
public String str = "manas6";
public void method_socket_address(String str2)throws IOException
{
InetAddress address = InetAddress.getByName(str);
System.out.println("Networking Host is http:// "+ address);
System.out.println("Host name : "+ address.getHostName());
System.out.println("Host IP : "+ address.getHostAddress());
//
InetAddress address2 = InetAddress.getByName(str2);
System.out.println("Remote server is http:// "+ address2);
System.out.println("Remote server name : "+ address2.getHostName());
System.out.println("Remote server IP : "+ address2.getHostAddress());
}
}