Commits


sgilmore10 authored and GitHub committed 4586689ea9e
GH-37345: [MATLAB] Add function handle to `fromMATLAB` static construction methods to `TypeTraits` classes (#37370) ### Rationale for this change Each concrete `arrow.array.Array` subclass has an associated `fromMATLAB `static construction method. It would be helpful if the `TypeTraits` classes had access to these corresponding fromMATLAB methods. This would involve adding a new property like `ArrayStaticConstructor` to the TypeTraits classes. For example: ```matlab >> arrow.type.traits.Int8Traits ans = Int8Traits with properties: ArrayConstructor: @ arrow.array.Int8Array ArrayClassName: "arrow.array.Int8Array" ArrayProxyClassName: "arrow.array.proxy.Int8Array" ArrayStaticConstructor: @ arrow.array.Int8Array.fromMATLAB TypeConstructor: @ arrow.type.Int8Type TypeClassName: "arrow.type.Int8Type" TypeProxyClassName: "arrow.type.proxy.Int8Type" MatlabConstructor: @ int8 MatlabClassName: "int8" ``` ### What changes are included in this PR? 1. Added a new abstract property called `ArrayStaticConstructor` to the parent class `arrow.type.traits.TypeTraits`. 2. Defined the `ArrayStaticConstructor` property in all concrete classes of `ArrayStaticConstructor`. ### Are these changes tested? Yes. Added a new test case to abstract test class `hTypeTraits.m`. ### Are there any user-facing changes? No. * Closes: #37345 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>