我正在尝试实施AnnotationProcessor
。我正在关注this tutorial。
我能够调试注释处理器,调试器转到方法:init
,getSupportedAnnotationTypes
,getSupportedOptions
,getSupportedSourceVersion
但它不会转到{{ 1}}方法。
我无法在互联网上找到有用的东西。你能告诉我为什么会发生这种情况以及如何解决这个问题?
谢谢。
答案 0 :(得分:3)
我刚发现为了运行patches-own
[ owner ] ;; patches know who owns them
turtles-own
[ territory ;; agentset of patches I own
food ;; food acquired in my territory
threshold ] ;; food required, will build territory until meet this
to go
tick
ask turtles [ build-territory ]
end
to build-territory
if food > threshold [ calculate-perimeter ] ;; stop building when enough food
pick-patch ;; keep picking patches until meet threshold.
end
to calculate-perimeter
;; what could I use to add up the perimeter of the territory?
end
方法。至少有一个元素半身像使用注释进行注释,该注释在process
中设置。