Modifying a Class Declaration

See Also

Using Class Outline, you can easily modify the general attributes of a class.

To modify a class declaration

  1. In Class Outline, right-click the name of the class you want to modify.

  2. On the shortcut menu, click Class Properties.

  3. Select an access modifier from the Access drop-down list. Nested (or inner) classes can be declared as public, protected, private, or default (package). Non-nested classes can be declared as public or default. For information about nested classes, see Inner Classes in the Java Language Specification.

  4. Select additional modifiers, such as abstract, final, or static. (Only nested classes can be declared as static.)

  5. To insert Javadoc comments for the class, enter the comment text in the Javadoc comment box.

  6. If you are exposing your class as a WFC component, select Include WFC Component Support (ClassInfo) to insert a ClassInfo class. (This option is only available for non-nested classes.) ClassInfo is used to describe the properties and events of the component.

  7. To expose your class as a COM object, select COM Class. When this option is selected, the @com.register directive is inserted to register your class as a COM class, making it accessible to other applications that support COM. (The COM Class option is only available for non-nested classes.)

  8. To add Microsoft Transaction Server support to your class, select Enabled under MTS Support. (This option is only available for non-nested classes.) Note that because transaction support is only valid for COM classes, enabling MTS support also selects the COM Class option. You can then select one of the following options from the drop-down list:

    The @com.register and @com.transaction directives are automatically added to your class. For more information about Microsoft Transaction Server, see Getting Started with Microsoft Transaction Server.

  9. Click OK to apply your changes.

Note   If you use the Text editor to modify a class declaration, Class Outline is automatically updated to show the changes.