Skip to main content

MetaObject

@physion/app / Exports / MetaObject

Class: MetaObject

Used for providing extra information for CoreObject subclasses

Constructors

constructor

new MetaObject(): MetaObject

Returns

MetaObject

Methods

allPropertyDescriptors

allPropertyDescriptors(): IPropertyDescriptor[]

Returns all property descriptors (including those of subclasses).

Returns

IPropertyDescriptor[]


className

className(): string

Returns

string


findPropertyDescriptor

findPropertyDescriptor(path): undefined | IPropertyDescriptor

Finds the property descriptor specified by the given path.

Parameters

NameTypeDescription
pathstringThe property path used to locate the property descriptor (e.g. "radius")

Returns

undefined | IPropertyDescriptor


getPropertyTextId

getPropertyTextId(path): undefined | string

Returns the textId (used for translations) for the property specified by the given path.

Parameters

NameTypeDescription
pathstringThe property path for which to get the textId.

Returns

undefined | string


hierarchy

hierarchy(): MetaObjectHierarchy

Returns the "hierarchy" of this MetaObject.

As "hierarchy" we define an array of meta-objects each which corresponds to a class in the hierarchy. (first item of the array being the base class)

Returns

MetaObjectHierarchy


inherits

inherits(metaObject): boolean

Returns true if the class described by this MetaObject inherits the type described by metaObject; otherwise returns false.

A type is considered to inherit itself.

Parameters

NameType
metaObjectMetaObject

Returns

boolean


propertyDescriptors

propertyDescriptors(): IPropertyDescriptor[]

Returns

IPropertyDescriptor[]


superClass

superClass(): undefined | MetaObject

Returns

undefined | MetaObject