OpenCOM
Class MetaInterface

java.lang.Object
  extended by OpenCOM.MetaInterface

public class MetaInterface
extends java.lang.Object

Each OpenCOM component contains this object to implement the interface meta-model. Methods for introspecting interfaces, and receptacles are available. Furthermore, meta-data can be attached and read as name-value pairs from both the interfaces and the receptacles.


Constructor Summary
MetaInterface(IOpenCOM pRTintf, IUnknown component)
          Creates a new instance of MetaInterface
 
Method Summary
 int enumIntfs(java.lang.Object o, java.util.Vector<java.lang.Class> ppIntf)
          Get the interfaces (as Java classes) of a component and stores them in the given vector.
 int enumRecps(IUnknown comp, java.util.Vector<OCM_RecpMetaInfo_t> ppRecpMetaInfo)
          Get the receptacles of a component and stores them in the given vector.
 java.util.Hashtable GetAllValues(java.lang.String Kind, java.lang.String iid)
          Retrieve all the name value pairs on either an interface or receptacle.
 TypedAttribute GetAttributeValue(java.lang.String iid, java.lang.String Kind, java.lang.String Name)
          Retrieve the value of a name value pair on either an interface or receptacle.
 void GetInterfaces(java.lang.Class c, java.util.Vector<java.lang.Class> a)
          Get the interfaces (as Java classes) of a component and stores them in the given vector.
 void ReadInterfaceNames(java.lang.Class c, java.util.Vector<java.lang.String> a)
           
 boolean SetAttributeValue(java.lang.String iid, java.lang.String Kind, java.lang.String Name, java.lang.String Type, java.lang.Object Value)
          Set the value of a name value pair on either an interface or receptacle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaInterface

public MetaInterface(IOpenCOM pRTintf,
                     IUnknown component)
Creates a new instance of MetaInterface

Method Detail

GetInterfaces

public void GetInterfaces(java.lang.Class c,
                          java.util.Vector<java.lang.Class> a)
Get the interfaces (as Java classes) of a component and stores them in the given vector. The operation is recursive to find inherited interfaces.

Parameters:
compClass - The class of the component.
intfList - The Vector to be filled with the components interfaces.

ReadInterfaceNames

public void ReadInterfaceNames(java.lang.Class c,
                               java.util.Vector<java.lang.String> a)

enumIntfs

public int enumIntfs(java.lang.Object o,
                     java.util.Vector<java.lang.Class> ppIntf)
Get the interfaces (as Java classes) of a component and stores them in the given vector.

Parameters:
compRef - The reference to the instance of the component.
intfList - The Vector to be filled with the components interfaces.
Returns:
An integer describing the number of interfaces on this component.

enumRecps

public int enumRecps(IUnknown comp,
                     java.util.Vector<OCM_RecpMetaInfo_t> ppRecpMetaInfo)
Get the receptacles of a component and stores them in the given vector.

Parameters:
compRef - The reference to the instance of the component.
intfList - The Vector to be filled with the component's receptacles.
Returns:
An integer describing the number of receptacles on this component.
See Also:
OCM_RecpMetaInfo_t

SetAttributeValue

public boolean SetAttributeValue(java.lang.String iid,
                                 java.lang.String Kind,
                                 java.lang.String Name,
                                 java.lang.String Type,
                                 java.lang.Object Value)
Set the value of a name value pair on either an interface or receptacle.

Parameters:
pIUnk - The reference to the instance of the component the interface or receptacle is hosted on.
Runtime - Reference to the OpenCOM runtime interface.
iid - The type of the interface or receptacle.
Kind - A string which is either "Interface" or "Receptacle".
Name - A string describing the attribute name.
Type - A string describing the attribute type.
Value - An object holding the attribute value.
Returns:
A boolean indicating if the attribute value was added.

GetAttributeValue

public TypedAttribute GetAttributeValue(java.lang.String iid,
                                        java.lang.String Kind,
                                        java.lang.String Name)
Retrieve the value of a name value pair on either an interface or receptacle.

Parameters:
pIUnk - The reference to the instance of the component the interface or receptacle is hosted on.
Runtime - Reference to the OpenCOM runtime interface.
iid - The type of the interface or receptacle.
Kind - A string which is either "Interface" or "Receptacle".
Name - A string describing the attribute name.
Returns:
An object holding the value of the attribute.

GetAllValues

public java.util.Hashtable GetAllValues(java.lang.String Kind,
                                        java.lang.String iid)
Retrieve all the name value pairs on either an interface or receptacle.

Parameters:
pIUnk - The reference to the instance of the component the interface or receptacle is hosted on.
iid - The type of the interface or receptacle.
Kind - A string which is either "Interface" or "Receptacle".
Returns:
An object holding the value of the attribute.