简体   繁体   English

Java 反射和搜索字段

[英]Java Reflection, and Searching for fields

I am trying to search for specific fields (those of type int[] ) that are loaded into memory from an applet that contains specific data.我正在尝试搜索从包含特定数据的小程序加载到内存中的特定字段(类型为int[]字段)。

I know I can use reflection for this but there are hundreds of classes with many fields within each one.我知道我可以为此使用反射,但是有数百个类,每个类中有许多字段。

I have tried to recursively do this but the stack size is too small.我试图递归地执行此操作,但堆栈大小太小。 I am capable of using find the memory addresses using cheat engine, but I believe the garbage collector is moving the data around so I can't use Unsafe.我能够使用作弊引擎查找内存地址,但我相信垃圾收集器正在移动数据,所以我不能使用 Unsafe。 Does anybody know of any other way I can find the fields I am looking for given the data contained within them?有没有人知道我可以通过其中包含的数据找到我正在寻找的字段的任何其他方式?

Simplest solution:最简单的解决方案:
Transform the code into a non-recursive function.将代码转换为非递归函数。 This is basically a simple graph-traversal problem.这基本上是一个简单的图遍历问题。 Shouldn't be too hard to transform.转型应该不会太难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM