Share via


IClassInfo Interface

Methods | This Package | All Packages

Defines the interface for exposing component metadata.

package com.ms.wfc.core

public interface IClassInfo

Remarks

The IClassInfo interface is used to provide component metadata that cannot be determined from the component itself. Examples of such metadata include the component's properties, events, icon, and so on.

A component never implements the IClassInfo interface directly. Rather, the component defines a public static inner class named ClassInfo, which in turn implements the IClassInfo interface. This type of implementation allows the metadata to be separated from the class itself in situations where the metadata is not required (such as when the component is deployed).

The following example shows a base class named Window and its associated ClassInfo implementation:

public class Window
{
   ... // Members of class Window.

   public static class ClassInfo implements IClassInfo
   {
      ... // Implementations of IClassInfo methods.
   }
}

If a component class extends another component class, the ClassInfo of the subclass typically extends the ClassInfo of the superclass. For example:

public class Button extends Window
{
   ... // Members of class Button.

   public static class ClassInfo extends Window.ClassInfo
   {
      ... // Overrides of IClassInfo methods.
   }
}

Compiling a component class that has an inner ClassInfo class produces two .class files. These files are named component.class and component$ClassInfo.class, where component is the name of the component class. The ComponentManager class uses this naming pattern to identify classes that support metadata.

See Also   ComponentInfo