Developer Transformation Guide > Java Transformation > Java Transformation Java Properties
  

Java Transformation Java Properties

Use the code entry tabs in the Java view to write and compile Java code that defines transformation behavior for specific transformation events.
The following tabs are code entry tabs:
View the full class code for the Java transformation on the Full Code tab.

Imports Tab

On the Imports tab, you can import third-party, built-in, or custom Java packages for active or passive Java transformations.
To import a Java package, enter the code to import the package in the Java code window in the Code properties on the Imports tab.
For example, you might enter the following code to import the java.io package:
import java.io.*;
To compile the code that imports Java packages, click Compile in the Compilation properties on the Imports tab. The results of the compilation appear in the Results window on the Imports tab.
After you import Java packages, you can use them on the other code entry tabs.

Helpers Tab

On the Helpers tab, you can declare user-defined variables and methods for the Java transformation class in an active or passive Java transformation.
To declare user-defined variables and methods, enter the code in the Java code window in the Code properties on the Helpers tab.
To compile the helper code for the Java transformation, click Compile in the Compilation properties on the Helpers tab. The results of the compilation appear in the Results window on the Helpers tab.
After you declare variables and methods, you can use them in any other code entry tab except the Imports tab.

On Input Tab

On the On Input tab, you define how an active or passive Java transformation behaves when it receives an input row. On this tab, you can also access and use input and output port data, variables, and Java transformation API methods.
The Java code that you define on this tab runs one time for each input row.
To define how a Java transformation behaves when it receives an input row, enter the code in the Java code window in the Code properties on the On Input tab.
From the navigator on the On Input tab, you can access and define the following variables and API methods:
To compile the code for the Java transformation, click Compile in the Compilation properties on the On Input tab. The results of the compilation appear in the Results window on the On Input tab.

At End Tab

On the At End tab, you define how an active or passive Java transformation behaves after it processes all input data. On this tab, you can also set output data for active transformations, and call Java transformation API methods.
To define how a Java transformation behaves after it processes all input data, enter the code in the Java code window in the Code properties on the At End tab.
You can access and define the following variables and API methods on the At End tab:
To compile the code for the Java transformation, click Compile in the Compilation properties on the At End tab. The results of the compilation appear in the Results window on the At End tab.

Functions Tab

On the Functions tab, you define functions that invoke expressions in a Java transformation with the Java programming language.
For example, you can define a function that invokes an expression that looks up the values of input or output ports or looks up the values of Java transformation variables.
To define a function, you can manually define functions in the Java code window in the Code properties on the Functions tab, or you can click New Function to invoke the Define Function dialog box, which enables you to easily define a function.
To compile the code, click Compile in the Compilation properties on the Functions tab. The results of the compilation appear in the Results window on the Functions tab.

Full Code Tab

On the Full Code tab, you can view, but not edit, the full class code for the Java transformation and compile the code.
You can view the full class code in the Java code window in the Code properties.
To compile the full code for the Java transformation, click Compile in the Compilation properties on the Full Code tab. The results of the compilation appear in the Results window on the Full Code tab.