Java - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

Name

Java

Purpose

Call a static Java method.

Description

This 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 randon number, using this expression:

Java ([className="java.util.Random", methodName="nextInt"], Java([classname="java.util.Random", methodName="new"))

Return Type

Simple

Variable Arguments

 

Variable Argument Type

Simple

Property

Class Name

The fully qualified name of the Java class to call.

Property

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.