如何确定方法返回某个值的原因
我如何确定为什么我从方法中专门获得这个值? (无需调试器,更改代码或复制它们)
好的,现在我解释我的问题的含义。我有一个包含许多关系和设置的大项目,我想知道预期结果何时被过滤或更改并变得不合适。主要目的是知道哪个过滤器或方法过滤了预期结果。
当然,我检查了 Annotations 和 Reflection API,但就我而言,它不合适,因为有太多案例和参数。
谢谢您的任何建议!
How I can to determine why I get specifically this value from method? (without debugger, changing code or duplicate them)
Ok, now I explain the meaning of my question. I have big project with many relations and settings and I want to know when expecting result filtered or changed and became not suitable. The main aim is know which of the filters or method filtered expected result.
Of course I checked Annotations and Reflection API but in my case it isn't suitable because have too much cases and arguments.
Thank you for any advice!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,听起来您需要返回一个描述过滤器或方法所做决策的对象。可以以某种方式总结决策的东西。例如:
类似的事情。如果没有提供太多细节,就很难比这更清楚了,但 Result 将是一个对象,它不仅捕获输出(即 value()),还捕获调用它的条件。您可以通过组合“结果”->“使其变得更复杂”例如,复合滤波器的 Results1 ... ResultsN。但我真的不明白你在做什么详细说明。但其想法是,您可以设想一个结果对象图,该图跟踪作为数据集过滤器应用的复杂逻辑,并询问哪些内容丢失了。
So it sounds like you need to return an object that describes the decisions made by a filter or method. Something that can summarize decisions in some way. For example:
Something along those lines. Without much detail provided it's hard to be more clear than that, but Result would be an object that captures not just the output (ie value()), but also the conditions in which it was called. You can make it more complex by combining Results -> Results1 ... ResultsN for composite filters for example. But I don't really understand what you are doing at any level of detail to elaborate. But the idea is that you could envision a graph of results objects that trace the complex logic applied as a filter on a dataset, and interrogate where things dropped out.