The Problem: An agent has a parameter that refers to an object (lets say an INode). I want to get and use the name of that INode as plain text without writing a function that maps INodes to their names. If currentLocation (which has a value of Node12) is the parameter, in a snippet, it looks like:
agent.currentLocation
Is there a name property of Parameters or other Objects that i can reference and it returns a String (just the text "Node12" in this case)? I have tried all kinds of references with parameter.name, getValue, etc, to no avail.
For INodes
you can use myNode.getName()
, as you can for every object in Java.
However, you cannot get the name of parameters, variables, etc. And you shouldn't do that, it is considered bad practice :-)