Java - 7.3

Talend Data Mapper Functions Reference Guide

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-01-05

Calls a static Java method.

The Java function calls a static Java method using the Java reflection mechanism and returns the value returned by the method.

Use the properties to specify only the class name and method name. Use the arguments to specify the arguments to the function. For example, to get the user.home Java system property, use this expression:
Java (class: java.lang.System, method: getProperty)
  Constant ("user.home")
Instance objects can also be called using this function. To do so, make the first argument of the method be an instance of the object to call. For example, to get a random number, using this expression:
Java ([className="java.util.Random", methodName="nextInt"], Java([classname="java.util.Random", methodName="new”))

Related examples

Arguments

Variable arguments Add Java parameters as arguments. They can be structure elements or functions.

Properties

Class Name The fully qualified name of the Java class to call.
Method Name The name of the Java method to call within the class. The Java method may have any number of parameters; this number of parameters must match the number of arguments specified when this function is used.