Kanzi  3.9.5
Java API
PropertyType< TDataType > Class Template Reference

An instance of a PropertyType represents a single property type in the Kanzi property system. More...

Inheritance diagram for PropertyType< TDataType >:
[legend]

Classes

enum  Mode
 Enumeration used for constructor overload resolution.
 

Public Member Functions

 PropertyType (Class< TDataType > clazz, TDataType defaultValue, EnumSet< PropertyTypeChangeFlag > flags, boolean inherited)
 Construct a new property type without a name. More...
 
 PropertyType (Class< TDataType > clazz, TDataType defaultValue, EnumSet< PropertyTypeChangeFlag > flags)
 Construct a new property type without a name. More...
 
 PropertyType (Class< TDataType > clazz, TDataType defaultValue)
 Construct a new property type without a name. More...
 
 PropertyType (Class< TDataType > clazz)
 Construct a new property type without a name. More...
 
 PropertyType (String name, Class< TDataType > clazz, TDataType defaultValue, EnumSet< PropertyTypeChangeFlag > flags, boolean inherited)
 Construct a new property type. More...
 
 PropertyType (String name, Class< TDataType > clazz, TDataType defaultValue, EnumSet< PropertyTypeChangeFlag > flags)
 Construct a new property type. More...
 
 PropertyType (String name, Class< TDataType > clazz, TDataType defaultValue)
 Construct a new property type. More...
 
 PropertyType (String name, Class< TDataType > clazz)
 Construct a new property type. More...
 
boolean equals (Object object)
 
EnumSet< PropertyTypeChangeFlaggetChangeFlags ()
 Gets the change flags for a property type. More...
 
PropertyDataType getDataType ()
 Gets the data type of a property type. More...
 
TDataType getDefaultValue ()
 Gets the default value for a property type. More...
 
boolean getIsInherited ()
 Returns whether a property type is inheritable. More...
 
String getName ()
 Gets the fully qualified name of a property type in the form "Class.PropertyType". More...
 
long getNative ()
 Gets a pointer to the backing C++ instance. More...
 
int hashCode ()
 

Detailed Description

An instance of a PropertyType represents a single property type in the Kanzi property system.

A property type exists throughout the lifetime of an application, including the property types that you create during the runtime of an application.

To work with the existing property types in the Kanzi property system, use the DynamicPropertyType and AbstractPropertyType classes.

Constructor & Destructor Documentation

◆ PropertyType() [1/8]

PropertyType ( Class< TDataType >  clazz,
TDataType  defaultValue,
EnumSet< PropertyTypeChangeFlag flags,
boolean  inherited 
)

Construct a new property type without a name.

The name of the property is assigned according to the metaclass' name the property is being added to and the field that is holding the property. If the field's name has a "Property" suffix, it gets trimmed from the name.

Parameters
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.
flagsThe flags that indicate how changes to the property type value affect the application. See PropertyTypeChangeFlag for valid options.
inheritedSets whether this property type is inheritable. Inheritance determines whether nodes can inherit from their ancestor nodes the value of this property type.

◆ PropertyType() [2/8]

PropertyType ( Class< TDataType >  clazz,
TDataType  defaultValue,
EnumSet< PropertyTypeChangeFlag flags 
)

Construct a new property type without a name.

The name of the property is assigned according to the metaclass' name the property is being added to and the field that is holding the property. If the field's name has a "Property" suffix, it gets trimmed from the name.

The property is not inherited.

Parameters
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.
flagsThe flags that indicate how changes to the property type value affect the application. See PropertyTypeChangeFlag for valid options.

◆ PropertyType() [3/8]

PropertyType ( Class< TDataType >  clazz,
TDataType  defaultValue 
)

Construct a new property type without a name.

The name of the property is assigned according to the metaclass' name the property is being added to and the field that is holding the property. If the field's name has a "Property" suffix, it gets trimmed from the name.

The property has no change flags set. The property is not inherited.

Parameters
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.

◆ PropertyType() [4/8]

PropertyType ( Class< TDataType >  clazz)

Construct a new property type without a name.

The name of the property is assigned according to the metaclass' name the property is being added to and the field that is holding the property. If the field's name has a "Property" suffix, it gets trimmed from the name.

The property has no change flags set. The property is not inherited.

Parameters
clazzClass of the datatype, for example 'Float.class'.

◆ PropertyType() [5/8]

PropertyType ( String  name,
Class< TDataType >  clazz,
TDataType  defaultValue,
EnumSet< PropertyTypeChangeFlag flags,
boolean  inherited 
)

Construct a new property type.

Parameters
nameFully qualified name for the property type.
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.
flagsThe flags that indicate how changes to the property type value affect the application. See PropertyTypeChangeFlag for valid options.
inheritedSets whether this property type is inheritable. Inheritance determines whether nodes can inherit from their ancestor nodes the value of this property type.

◆ PropertyType() [6/8]

PropertyType ( String  name,
Class< TDataType >  clazz,
TDataType  defaultValue,
EnumSet< PropertyTypeChangeFlag flags 
)

Construct a new property type.

The property is not inherited.

Parameters
nameFully qualified name for the property type.
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.
flagsThe flags that indicate how changes to the property type value affect the application. See PropertyTypeChangeFlag for valid options.

◆ PropertyType() [7/8]

PropertyType ( String  name,
Class< TDataType >  clazz,
TDataType  defaultValue 
)

Construct a new property type.

The property has no change flags set. The property is not inherited.

Parameters
nameFully qualified name for the property type.
clazzClass of the datatype, for example 'Float.class'.
defaultValueThe default value for the property type.

◆ PropertyType() [8/8]

PropertyType ( String  name,
Class< TDataType >  clazz 
)

Construct a new property type.

The property has no change flags set. The property is not inherited.

Parameters
nameFully qualified name for the property type.
clazzClass of the datatype, for example 'Float.class'.

Member Function Documentation

◆ getChangeFlags()

EnumSet<PropertyTypeChangeFlag> getChangeFlags ( )

Gets the change flags for a property type.

Change flags indicate whether a modification of property value invalidates a particular aspect of a node. For example, when you change the com.rightware.kanzi.metadata.NodeMetadata#HeightProperty or com.rightware.kanzi.metadata.NodeMetadata#WidthProperty in a node Kanzi recalculates the layout.

Returns
The change flags for a property type.

◆ getDataType()

PropertyDataType getDataType ( )

Gets the data type of a property type.

The data type of a property type defines the data representation type of each property value. For example, float.

Returns
The data type of a property type.

◆ getDefaultValue()

TDataType getDefaultValue ( )

Gets the default value for a property type.

Returns
The default value.

◆ getIsInherited()

boolean getIsInherited ( )

Returns whether a property type is inheritable.

Inheritable property types provide values to all descendant nodes.

Returns
If the property type is inheritable, true, otherwise false.

◆ getName()

String getName ( )

Gets the fully qualified name of a property type in the form "Class.PropertyType".

Returns
The fully qualified name of a property type.

◆ getNative()

long getNative ( )

Gets a pointer to the backing C++ instance.

Returns
A pointer to the backing C++ instance. Type: kanzi::AbstractPropertyTypeDescriptor*.