Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 

User Guide - Additional code/objects

Index    Previous   <<>>  Next
  
13.1 Overview

13.2 Classes

13.3 Interfaces

13.4 Methods

13.5 Variables

13.6 Imports

  13.1  OverviewTo top of page

JCodeBox allows you to add standard Java code throughout your applications using the JCodeBox GUI. This code can then be used as you would use it in any other Java application i.e. classes can be instantiated, methods can be invoked, interfaces can be implemented, etc. This feature is particularly useful for adding business functionality to your J2EE components and adding supporting classes to your application.

Currently the following are supported:

  • Classes
  • Interfaces
  • Methods
  • Variables
  • Imports

  13.2  ClassesTo top of page

Classes can be defined for the web and business tiers. Classes defined in the business tier are also available to components in the web tier. See chapter 7. Tiers for further information.

The define class dialog is used to add/edit/remove a class (Tier properties, code tab). This dialog is described in further detail below.

  • Visibility
  • Select the visibility of the class from the visibility dropdown.

  • Imports
  • Use the import buttons to add/edit/remove imports for the class via the enter import dialog. The application button allows you to add imports for other components in your application.

  • Modifiers
  • Use the modifiers buttons to add/remove modifiers for the class via the select modifier dialog.

  • Interfaces
  • Use the interfaces buttons to add/edit/remove any interfaces the class will implement via the enter interface dialog.

  • Variables
  • Use the variables buttons to add/edit/remove variables for the class via the define variable dialog (described in more detail later in this chapter).

  • Methods
  • Use the methods buttons to add/edit/remove methods for the class via the define method dialog (described in more detail later in this chapter).

  • Package
  • Enter the package for the class in the package text field.

  • Class name
  • Enter the class name in the class name text field.

  • Parent class name
  • Enter the parent class for the class in the parent class name text field.

  • Class description
  • Enter a description for the class in the class description text field.

  13.3  InterfacesTo top of page

Interfaces can be defined for the web and business tiers. Interfaces defined in the business tier are also available to components in the web tier. See chapter 7. Tiers for further information.

The define interface dialog is used to add/edit/remove an interface (Tier properties, code tab). This dialog is described in further detail below.

  • Visibility
  • Select the visibility of the interface from the visibility dropdown.

  • Imports
  • Use the import buttons to add/edit/remove imports for the interface via the enter import dialog. The application button allows you to add imports for other components in your application.

  • Interfaces
  • Use the interfaces buttons to add/edit/remove any interfaces the interface will extend via the enter interface dialog.

  • Methods
  • Use the methods buttons to add/edit/remove methods for the interface via the define method dialog (described in more detail later in this chapter).

  • Package
  • Enter the package for the interface in the package text field.

  • Interface name
  • Enter the interface name in the interface name text field.

  • Interface description
  • Enter a description for the interface in the interface description text field.

  13.4  MethodsTo top of page

  • Visibility
  • Select the visibility of the method from the visibility dropdown.

  • Return Type
  • Enter the return type in the return type text field.

  • Modifiers
  • Use the modifiers buttons to add/remove modifiers for the method via the select modifier dialog.

  • Parameters
  • Use the parameters buttons to add/remove parameters for the method via the define parameter dialog.

  • Exceptions
  • Use the exceptions buttons to add/remove exceptions for the method via the select exception dialog.

  • Method description
  • Enter a description for the method in the method description text field.

  • Method name
  • Enter the method name in the method name text field.

  • Method Implementation
  • Enter the method implementation in the method implementation text area.

    If you right mouse click on the method implementation text area you will be presented with the auto-code menu. This menu allows you to insert commonly used fragments of code (i.e. bean lookup code, environment entry lookup code, etc) into your method implementation. Note that auto-code is not available when defining methods for interfaces as interface methods do not contain a method body.

  13.5  VariablesTo top of page

  • Visibility
  • Select the visibility of the variable from the visibility dropdown.

  • Modifiers
  • Use the modifiers buttons to add/remove modifiers for the variable via the select modifier dialog.

  • Variable description
  • Enter a description for the variable in the variable description text field.

  • Variable type
  • Enter the variable type in the variable type text field.

  • Variable name
  • Enter the variable name in the variable name text field.

  13.6  ImportsTo top of page

  • Import
  • Enter the import (i.e. java.util.ArrayList) into the import text field

Index    Previous   <<>>  Next

[an error occurred while processing this directive]