tailieunhanh - EGL Calling Java
This Learning Module shows how to use EGL to call Java classes, methods and access class variables. | EGL Calling Java This Learning Module shows how to use EGL to call Java classes, methods and access class variables. EGL externalType Part An externalType part provides the EGL mapping to a Java Class. This is similar to the mapping that an EGL Interface provides for Web Service functions, but extends to map Java class variables and constructors. Invoking ExternalType functions If the class or function is marked static, Simply invoke it using the name of its externalType part and use dot syntax to reference the methods (); If the class or function is non-static (more typical) Create a variable based on its externalType part – initialize it with a new keyword Use it in much the same way you would a library name (use dot syntax for the methods) (); externalType Declaration Two class variables One custom method class “constructor method” Variable of externalType(TaxModule) Create new (non-static) instance Initialize class variable values Call calculateTax routine Notes: As a true, EGL Part – once an externalType is declared, it can be used in any EGL business logic in your Workspace A Java constructor is similar to the EGL JSF Handler onConstruction() function. It is run by the JVM and is provided to allow Java developers to initialize values and perform setup processing for a class PRIOR to it being called EGL Calling Java Calling EGL – 1 of 2 The following types of transfer of control are possible in EGL: EGL-generated Java™ program to EGL-generated Java program Non-EGL (native or hand-coded) Java program to EGL program EGL-generated Java program to non-EGL Java program EGL-generated Java program to DLL EGL-generated Java program to .EXE or .BAT file 1. EGL-generated Java program to EGL-generated Java program Calling one EGL-generated program from another is as simple as invoking the Java class for the target program using a call statement. Be aware, however, of package dependencies. You must invoke a class that | EGL Calling Java This Learning Module shows how to use EGL to call Java classes, methods and access class variables. EGL externalType Part An externalType part provides the EGL mapping to a Java Class. This is similar to the mapping that an EGL Interface provides for Web Service functions, but extends to map Java class variables and constructors. Invoking ExternalType functions If the class or function is marked static, Simply invoke it using the name of its externalType part and use dot syntax to reference the methods (); If the class or function is non-static (more typical) Create a variable based on its externalType part – initialize it with a new keyword Use it in much the same way you would a library name (use dot syntax for the methods) (); externalType Declaration Two class variables One custom method class “constructor method” Variable of externalType(TaxModule) Create new (non-static) instance Initialize class variable .
đang nạp các trang xem trước