ECClass Class

A common abstract class for all of the ECClass types.

Extends

Extended by

Implements

Methods

Name Description
createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty> Protected Creates a PrimitiveArrayECProperty.  
createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty> Protected    
createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty Protected Creates a PrimitiveArrayECProperty.  
createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty Protected    
createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty> Protected    
createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty> Protected Creates a PrimitiveECProperty.  
createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty Protected    
createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty Protected Creates a PrimitiveECProperty.  
fromJSON(classProps: ClassProps): Promise<void>    
fromJSONSync(classProps: ClassProps): void    
getAllBaseClasses(): AsyncIterable<ECClass, any, any> Iterates (recursively) over all base classes and mixins, in "property override" order.  
getAllBaseClassesSync(): Iterable<AnyClass, any, any>    
getBaseClassSync(): undefined | ECClass    
getCustomAttributes(): Promise<> Retrieve all custom attributes in the current class and its bases  
getCustomAttributesSync(): Retrieve all custom attributes in the current class and its bases.  
getDerivedClasses(): Promise<undefined | ECClass[]> Gets the derived classes belonging to this class.  
getInheritedProperty(name: string): Promise<undefined | Property> Searches the base class, if one exists, for the property with the name provided.  
getInheritedPropertySync(name: string): undefined | Property Searches the base class, if one exists, for the property with the name provided.  
getProperties(excludeInherited?: boolean): Promise<Iterable<Property, any, any>> Returns the properties on this class and its base classes.  
getPropertiesSync(excludeInherited?: boolean): Iterable<Property, any, any> Returns the properties on this class and its base classes.  
getProperty(name: string, excludeInherited: booleanfalse): Promise<undefined | Property> Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on  
getPropertySync(name: string, excludeInherited: booleanfalse): undefined | Property Searches, case-insensitive, for a local ECProperty with the name provided.  
is(targetClass: ECClass): Promise<boolean>    
is(targetClass: string, schemaName: string): Promise<boolean> Indicates if the targetClass is of this type.  
isSync(targetClass: ECClass): boolean A synchronous version of the ECClass.is, indicating if the targetClass is of this type.  
toJSON(standalone: booleanfalse, includeSchemaVersion: booleanfalse): ClassProps Save this Classes properties to an object for serializing to JSON.  
traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback  
traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback  

Inherited methods

Name Inherited from Description
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static Inherited SchemaItem Indicates if the two SchemaItem objects are equal by comparing their respective key properties.
parseFullName(fullName: string): [string, string] Static Inherited SchemaItem Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings.

Properties

Name Type Description
baseClass Accessor ReadOnly undefined | LazyLoadedECClass Gets the base class if it exists, otherwise returns undefined.  
customAttributes Accessor ReadOnly undefined |    
hasLocalProperties Accessor ReadOnly boolean Quick way to check whether this class has any local properties without having to use the iterable  
modifier Accessor ReadOnly ECClassModifier    

Inherited properties

Name Type Inherited from Description
description Accessor Inherited ReadOnly undefined | string SchemaItem  
fullName Accessor Inherited ReadOnly string SchemaItem  
key Accessor Inherited ReadOnly SchemaItemKey SchemaItem  
label Accessor Inherited ReadOnly undefined | string SchemaItem  
name Accessor Inherited ReadOnly string SchemaItem  
schema Readonly Inherited Schema SchemaItem  
schemaItemType Accessor Abstract Inherited ReadOnly SchemaItemType SchemaItem Get the type of item represented by this instance

Defined in

Last Updated: 26 April, 2025