try { cons = jdk12InetAddressAction.class.getConstructor(new Class[] { InetAddress.class, String.class, String.class}); } catch (Throwable e) { } this.addr = addr; this.method = method; this.arg = arg;
try { if (method.equals("getLocalHost")) return InetAddress.getLocalHost(); else if (method.equals("getAllByName")) return InetAddress.getAllByName(arg); else if (method.equals("getByName")) return InetAddress.getByName(arg); else if (method.equals("getHostName")) return addr.getHostName(); else return null; } catch (Throwable t) { return null; }