Main Content

findprop

Class: handle

Find matlab.metadata.Property object

Syntax

mp = findprop(h,property)

Description

mp = findprop(h,property) returns the matlab.metadata.Property object associated with the named property of the object h. property can be a property defined by the class of h or a dynamic property defined only for the object h.

Input Arguments

expand all

Handle object, specified as a scalar handle.

Name of property, specified as case-sensitive, quoted text.

Data Types: char | string

Output Arguments

expand all

matlab.metadata.Property object that is associated with the named property. If findprop does not find the property on the object h, findprop returns a 0-by-1 empty matlab.metadata.Property object. If the property is a dynamic property, then this function returns a matlasb.metadata.DynamicProperty object

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Display the current attribute values of the containers.Map Count property.

mp = findprop(containers.Map,'Count');
disp(mp)
  Property with properties:

                    Name: 'Count'
             Description: 'Number of pairs in the collection'
     DetailedDescription: ''
               GetAccess: 'public'
               SetAccess: 'private'
               Dependent: 1
                Constant: 0
                Abstract: 0
               Transient: 1
                  Hidden: 0
           GetObservable: 0
           SetObservable: 0
                AbortSet: 0
             NonCopyable: 1
    PartialMatchPriority: 1
               GetMethod: []
               SetMethod: []
              HasDefault: 0
              Validation: [0x0 matlab.metadata.Validation]
           DefiningClass: [1x1 matlab.metadata.Class]

Extended Capabilities

Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.