Page Contents

Home > @loopback/metadata > MetadataInspector

MetadataInspector class

Inspector for metadata applied by decorators

Signature:

export declare class MetadataInspector 

Properties

Property Modifiers Type Description
[DesignTimeReflector](/doc/en/lb4/apidocs.metadata.metadatainspector.designtimereflector.html) `static` `readonly` [NamespacedReflect](/doc/en/lb4/apidocs.metadata.namespacedreflect.html) Expose the reflector for TypeScript design-time metadata
[Reflector](/doc/en/lb4/apidocs.metadata.metadatainspector.reflector.html) `static` `readonly` [NamespacedReflect](/doc/en/lb4/apidocs.metadata.namespacedreflect.html) Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback` as the namespace prefix for all metadata keys

Methods

Method Modifiers Description
[defineMetadata(key, value, target, member)](/doc/en/lb4/apidocs.metadata.metadatainspector.definemetadata.html) `static` Define metadata for the given target
[getAllMethodMetadata(key, target, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getallmethodmetadata.html) `static` Get the metadata associated with the given key for all methods of the target class or prototype
[getAllParameterMetadata(key, target, methodName, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getallparametermetadata.html) `static` Get the metadata associated with the given key for all parameters of a given method
[getAllPropertyMetadata(key, target, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getallpropertymetadata.html) `static` Get the metadata associated with the given key for all properties of the target class or prototype
[getClassMetadata(key, target, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getclassmetadata.html) `static` Get the metadata associated with the given key for a given class
[getDesignTypeForMethod(target, methodName)](/doc/en/lb4/apidocs.metadata.metadatainspector.getdesigntypeformethod.html) `static` Get TypeScript design time type for a method.
[getDesignTypeForProperty(target, propertyName)](/doc/en/lb4/apidocs.metadata.metadatainspector.getdesigntypeforproperty.html) `static` Get TypeScript design time type for a property
[getMethodMetadata(key, target, methodName, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getmethodmetadata.html) `static` Get the metadata associated with the given key for a given method of the target class or prototype
[getParameterMetadata(key, target, methodName, index, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getparametermetadata.html) `static` Get the metadata associated with the given key for a parameter of a given method by index
[getPropertyMetadata(key, target, propertyName, options)](/doc/en/lb4/apidocs.metadata.metadatainspector.getpropertymetadata.html) `static` Get the metadata associated with the given key for a given property of the target class or prototype