system
is actually detailed in the TDI JavaDocs under the com.ibm.di.function.UserFunctions
class. Or that main
goes by the whimsical class name com.ibm.di.server.RS
and task
is com.ibm.di.server.AssemblyLine
.But this is no problem when all you have to do is ask:
task.logmsg(" system: " + system.getClass());
task.logmsg(" task: " + task.getClass());
task.logmsg(" main: " + main.getClass());
The getClass() method is available for all Java objects and so will work for any variables that reference one; However, it will not work for JavaScript types (e.g. Number, String of Boolean).
To get around this limitation we can make our own getClass() function:
function getClass( v ) {
if (typeof(v) == "object")
return v.getClass()
else
typeof(v);
}
Then you'll be on speaking terms with variables from both worlds.
No comments:
Post a Comment