Kanzi  3.9.9
Kanzi Engine Java API
Metaclass Class Reference

Metaclass provides type inspection mechanism for Kanzi classes. More...

Inheritance diagram for Metaclass:
[legend]

Classes

class  Iterator
 
enum  Mode
 Enumeration used to track ownership.
 

Public Member Functions

 Metaclass (String name)
 Creates a new metaclass. More...
 
void addMessageType (MessageType< MessageArgumentType > messageType)
 Adds a message type. More...
 
void addNestedMetaclass (Metaclass nestedMetaclass)
 Adds a nested metaclass. More...
 
void addPropertyType (PropertyType< TDataType > propertyType)
 Adds a property type. More...
 
ObjectRef< ObjectType > create (Domain domain, String name)
 Create an instance of the class described by the metaclass. More...
 
boolean equals (Object object)
 
Metaclass getBase ()
 Returns the metaclass of the base class. More...
 
String getName ()
 Returns the fully qualified name of this metaclass. More...
 
long getNative ()
 Gets a pointer to the backing C++ instance. More...
 
int hashCode ()
 
boolean isAbstract ()
 Returns whether the metaclass is abstract or not. More...
 
Iterable< AbstractMessageTypeiterateMessageTypes ()
 Gets an Iterable object used to iterate the message types of the metaclass. More...
 
Iterable< MetaclassiterateNestedMetaclass ()
 Gets an Iterable object used to iterate the nested metaclasses of the metaclass. More...
 
Iterable< AbstractPropertyTypeiteratePropertyTypes ()
 Gets an Iterable object used to iterate the property types of the metaclass. More...
 

Static Public Member Functions

static MetaclassWrapper getWrapper (Metaclass metaclass)
 Gets a wrapper for a Metaclass object. More...
 

Detailed Description

Metaclass provides type inspection mechanism for Kanzi classes.

Classes deriving from Object can register information about their type, properties, methods, messages by using Metaclass and accompanying macros. Such information is used by serialization, scripting and to display friendly type information in Kanzi Studio.

Constructor & Destructor Documentation

Metaclass ( String  name)

Creates a new metaclass.

When registered, Kanzi automatically finds the owning class, based on the location of the Metaclass instance.

Parameters
nameFully qualified name of the metaclass.

Member Function Documentation

void addMessageType ( MessageType< MessageArgumentType >  messageType)

Adds a message type.

Parameters
messageTypeMessage type to be added.
void addNestedMetaclass ( Metaclass  nestedMetaclass)

Adds a nested metaclass.

Parameters
nestedMetaclassNested metaclass to be added.
void addPropertyType ( PropertyType< TDataType >  propertyType)

Adds a property type.

Parameters
propertyTypeProperty type to be added.
ObjectRef<ObjectType> create ( Domain  domain,
String  name 
)

Create an instance of the class described by the metaclass.

Parameters
domainThe domain to use for the created object.
nameThe name of the created object.
Returns
An new object instance as described by the metaclass
Metaclass getBase ( )

Returns the metaclass of the base class.

Returns
Metaclass of the base class.
String getName ( )

Returns the fully qualified name of this metaclass.

Returns
Fully qualified name of this metaclass.
long getNative ( )

Gets a pointer to the backing C++ instance.

Returns
A pointer to the backing C++ instance. Type: const kanzi::Metaclass*.
static MetaclassWrapper getWrapper ( Metaclass  metaclass)
static

Gets a wrapper for a Metaclass object.

Parameters
metaclassThe Metaclass object to wrap.
Returns
MetaclassWrapper for a Metaclass object.
boolean isAbstract ( )

Returns whether the metaclass is abstract or not.

Returns
Returns true if the class described by the metaclass is abstract, false otherwise.
Iterable<AbstractMessageType> iterateMessageTypes ( )

Gets an Iterable object used to iterate the message types of the metaclass.

Returns
An iterable of message types of the metaclass.
Iterable<Metaclass> iterateNestedMetaclass ( )

Gets an Iterable object used to iterate the nested metaclasses of the metaclass.

Returns
An iterable of nested metaclasses of the metaclass.
Iterable<AbstractPropertyType> iteratePropertyTypes ( )

Gets an Iterable object used to iterate the property types of the metaclass.

Returns
An iterable of property types of the metaclass.