Modifying a Class Declaration
See Also
Using Class Outline, you can easily modify the general attributes of a class.
To modify a class declaration
-
In Class Outline, right-click the name of the class you want to modify.
-
On the shortcut menu, click Class Properties.
-
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.
-
Select additional modifiers, such as abstract, final, or static. (Only nested classes can be declared as static.)
-
To insert Javadoc comments for the class, enter the comment text in the Javadoc comment box.
-
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.
-
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.)
-
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:
-
Required The component requires an MTS transaction for its work.
-
RequiresNew The component requires a new MTS transaction for its work. (A new transaction is created, even if one already exists.)
-
Supported The component works regardless of whether a transaction is provided by MTS.
-
NotSupported The component supports neither MTS transactions nor the MTS API.
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.
-
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.