Creates an instance of an object type specified by its name and library where it is defined.
an object type name.
a library (module) where object type is defined.
arguments for the object constructor.
the created object instance.
Creates an instance of an object type specified by type descriptor.
a type descriptor that points to an object type
arguments for the object constructor.
the created object instance.
Creates an instance of an object type.
an object type (factory function) to create.
arguments for the object constructor.
the created object instance.
Gets object type by its name and library where it is defined.
an object type name.
a library where the type is defined
the object type or null is the type wasn't found.
Gets object type by type descriptor.
a type descriptor that points to an object type
the object type or null is the type wasn't found.
Checks if value has primitive type.
Primitive types are: numbers, strings, booleans, date and time. Complex (non-primitive types are): objects, maps and arrays
a value to check
true if the value has primitive type and false if value type is complex.
Generated using TypeDoc
Helper class to perform object type introspection and object instantiation.
This class has symmetric implementation across all languages supported by Pip.Services toolkit and used to support dynamic data processing.
Because all languages have different casing and case sensitivity rules, this TypeReflector treats all type names as case insensitive.
TypeDescriptor
Example
let descriptor = new TypeDescriptor("MyObject", "mylibrary"); Typeeflector.getTypeByDescriptor(descriptor); let myObj = TypeReflector.createInstanceByDescriptor(descriptor); TypeDescriptor.isPrimitive(myObject); // Result: false TypeDescriptor.isPrimitive(123); // Result: true