我将GRADLE_OPTS系统环境变量添加为:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
Run Code Online (Sandbox Code Playgroud)
我已经从InteliJ IDEA为这个套接字创建了远程调试器.我可以调试build.gradle文件,但我无法进入脚本例如无法看到变量值.
我可以重写 的任何方法吗array?
例如toString()或其他方法。
import java.lang.reflect.Method;
public class ArraysClassTest {
static int[] array = { 1, 2, 3, 1 };
public static void main(String[] args) {
Class<? extends int[]> class1 = array.getClass();
try {
Method method = class1.getMethod("toString");
} catch (NoSuchMethodException | SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)