Modifying Class Attributes

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

To modify class attributes

  1. Start Class Builder and make sure the class is selected by Class Builder. For information on how to do this, see Starting Class Builder.

  2. Click the General tab in Class Builder.

  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 control, select Include ClassInfo to insert a ClassInfo class into your class. (This option is only available for non-nested classes.) ClassInfo is used to describe the properties and events of the control.

  7. To expose your class as a COM object, select COM Class. When this option is selected, Class Builder inserts the @com.register tag to register your class as a COM class, making it accessible to other languages 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:

    Class Builder automatically inserts the @com.register and @com.transaction tags, and adds the com.ms.mtx.IObjectControl interface to the list of implemented interfaces (if this interface is on the classpath). For more information about Microsoft Transaction Server, see Getting Started with Microsoft Transaction Server.