ComponentMetaData (class)
public sealed ComponentMetaData {inherits Serializable}
Package: CURL.LANGUAGE.COMPONENT
Direct Known Subclasses: ComponentSelector

The container for meta-data for Components.


Constructors
default:Initialize meta-data
constructor public {ComponentMetaData.default
    frozen?:bool = false,
    copy-from:#ComponentMetaData = null,
    from-string:#String = null,
    deep-copy?:bool = false,
    ...
}
Properties
author:The name of the author of this component.
accessor public sealed ComponentMetaData.author:#String
setter public sealed ComponentMetaData.author:#String
cache-duration:Amount of time component may be cached without doing out-of-date checks.
accessor public sealed ComponentMetaData.cache-duration:Time
setter public sealed ComponentMetaData.cache-duration:Time
compilation-time:Timestamp identifying start of compilation of component.
accessor public sealed inline ComponentMetaData.compilation-time:#DateTimeData
setter public sealed ComponentMetaData.compilation-time:#DateTimeData
component-type:Identifies the type of component.
accessor public sealed inline ComponentMetaData.component-type:#String
setter public sealed ComponentMetaData.component-type:#String
content-id:A unique, secure content-identifier for the component.
accessor public sealed inline ComponentMetaData.content-id:#ComponentID
setter public sealed ComponentMetaData.content-id:#ComponentID
content-size:The size of the component.
accessor public sealed inline ComponentMetaData.content-size:int
setter public sealed ComponentMetaData.content-size:int
copyright:Copyright message for component.
accessor public sealed ComponentMetaData.copyright:#String
setter public sealed ComponentMetaData.copyright:#String
curl-api-version:The API version from the curl herald used to compile component.
accessor public sealed inline ComponentMetaData.curl-api-version:#VersionNumber
setter public sealed ComponentMetaData.curl-api-version:#VersionNumber
curl-file-signatures:Contents of curl-file-signatures in this component.
accessor public sealed ComponentMetaData.curl-file-signatures:#ReadOnlyStringArray
setter public sealed ComponentMetaData.curl-file-signatures:#ReadOnlyStringArray
curl-versions:List of Curl versions in which the component may be used.
accessor public sealed ComponentMetaData.curl-versions:#{ReadOnlyArray-of VersionNumber}
setter public sealed ComponentMetaData.curl-versions:#{ReadOnlyArray-of VersionNumber}
debuggable?:Indicates whether component is debuggable. Defaults to false.
accessor public sealed inline ComponentMetaData.debuggable?:bool
setter public sealed ComponentMetaData.debuggable?:bool
default-locale:Default locale for component
accessor public sealed ComponentMetaData.default-locale:#String
setter public sealed ComponentMetaData.default-locale:#String
file:Abstract file name of a resource.
accessor public sealed ComponentMetaData.file:#String
setter public sealed ComponentMetaData.file:#String
file-format:The file format of the component.
accessor public sealed inline ComponentMetaData.file-format:#String
setter public sealed ComponentMetaData.file-format:#String
files:List of filenames included in the component.
accessor public sealed ComponentMetaData.files:#{ReadOnlyArray-of String}
setter public sealed ComponentMetaData.files:#{ReadOnlyArray-of String}
frozen?:Indicates if object is "frozen".
field public-get hidden-set ComponentMetaData.frozen?:bool
id:The unique identifier for the component.
accessor public sealed inline ComponentMetaData.id:#ComponentID
setter public sealed ComponentMetaData.id:#ComponentID
jit-compilable?:Indicates whether component may be JIT-compiled. Defaults to true.
accessor public sealed inline ComponentMetaData.jit-compilable?:bool
setter public sealed ComponentMetaData.jit-compilable?:bool
jit-compiled?:Indicates whether component was JIT-compiled. Defaults to true.
accessor public sealed inline ComponentMetaData.jit-compiled?:bool
setter public sealed ComponentMetaData.jit-compiled?:bool
license:
accessor public sealed ComponentMetaData.license:#String
setter public sealed ComponentMetaData.license:#String
locale:Identifies the locale of the component.
accessor public sealed ComponentMetaData.locale:#String
setter public sealed ComponentMetaData.locale:#String
manifest:The location of the manifest associated with this component.
accessor public sealed ComponentMetaData.manifest:#String
setter public sealed ComponentMetaData.manifest:#String
name:The name of the component.
accessor public sealed inline ComponentMetaData.name:#String
setter public sealed ComponentMetaData.name:#String
origin-url-names:List of URLs of possible sources for this component.
accessor public sealed ComponentMetaData.origin-url-names:#ReadOnlyStringArray
setter public sealed ComponentMetaData.origin-url-names:#ReadOnlyStringArray
package-caching-style:Package caching style for this component.
accessor public sealed ComponentMetaData.package-caching-style:#String
setter public sealed ComponentMetaData.package-caching-style:#String
release-notes:Release notes for this component.
accessor public sealed ComponentMetaData.release-notes:#String
setter public sealed ComponentMetaData.release-notes:#String
release-timestamp:Release date and time of component.
accessor public sealed ComponentMetaData.release-timestamp:#DateTimeData
setter public sealed ComponentMetaData.release-timestamp:#DateTimeData
requires-privilege?:Whether component requires privilege to use.
accessor public final ComponentMetaData.requires-privilege?:bool
setter public final ComponentMetaData.requires-privilege?:bool
resource-directory:Specifies root directory containing resources for component.
accessor public sealed ComponentMetaData.resource-directory:#String
setter public sealed ComponentMetaData.resource-directory:#String
resync-as-of:Resynchronization time for component
accessor public sealed ComponentMetaData.resync-as-of:#DateTimeData
setter public sealed ComponentMetaData.resync-as-of:#DateTimeData
SHA-1-digest:The SHA-1 digest of a file.
accessor public sealed ComponentMetaData.SHA-1-digest:#SHA-1-Digest
setter public sealed ComponentMetaData.SHA-1-digest:#SHA-1-Digest
source-url:Constructs a Url from ComponentMetaData.source-url-name.
accessor public final ComponentMetaData.source-url:#Url
source-url-name:A string containing the absolute Url of the source from which the component is compiled.
accessor public sealed ComponentMetaData.source-url-name:#String
setter public sealed ComponentMetaData.source-url-name:#String
transitive-id:A unique id for the component that includes dependencies.
accessor public sealed inline ComponentMetaData.transitive-id:#ComponentID
setter public sealed ComponentMetaData.transitive-id:#ComponentID
translations-file:Specifies name of file containing translations for component.
accessor public sealed ComponentMetaData.translations-file:#String
setter public sealed ComponentMetaData.translations-file:#String
version:The version of the component.
accessor public sealed inline ComponentMetaData.version:#VersionNumber
setter public sealed ComponentMetaData.version:#VersionNumber
Class Procedures
supported-value-type?:Indicates if type may be used as a meta-data value.
public {ComponentMetaData.supported-value-type? type:Type}:bool
Methods
assert-match:Throws ComponentMismatchError if the meta-data does not match that of component.
public sealed {ComponentMetaData.assert-match component:Component}:void
assert-not-frozen:Asserts that object is not frozen.
protected final {ComponentMetaData.assert-not-frozen}:void
clone:Returns copy of object.
public sealed inline {ComponentMetaData.clone
    deep-copy?:bool = false
}:ComponentMetaData
freeze:Freeze the meta-data so that it cannot be changed.
public sealed inline {ComponentMetaData.freeze}:void
get:Get meta-data value for given key.
public sealed {ComponentMetaData.get key:String}:any
get-if-exists:Get meta-data value for given key.
public sealed {ComponentMetaData.get-if-exists
    key:String
}:(value:any, found?:bool)
keys-to-Iterator:Returns an iterator for the keys in the meta-data.
public sealed inline {ComponentMetaData.keys-to-Iterator
}:{Iterator-of String}
matches?:Indicates if other matches attributes of current object.
public sealed {ComponentMetaData.matches?
    other:ComponentMetaData
}:(match?:bool, first-non-match:#String)
set:Set meta-data value for key.
public sealed {ComponentMetaData.set key:String, value:any}:void
set-meta-data:Sets meta-data from ...
protected sealed {ComponentMetaData.set-meta-data ...}:void
set?:Indicates if value for key has been set.
public sealed {ComponentMetaData.set? key:String}:bool
unset:Unsets an existing value for key.
public sealed inline {ComponentMetaData.unset key:String}:void
Methods inherited from Object: object-describe, object-describe-for-debugging, object-serialize

Constructor Details
default (constructor)
public {ComponentMetaData.default
    frozen?:bool = false,
    copy-from:#ComponentMetaData = null,
    from-string:#String = null,
    deep-copy?:bool = false,
    ...
}

Initialize meta-data

component: If specified, the meta-data will be extracted from the component. No other arguments should be provided.

Currently the id is the same as the url-name for the component. This will eventually change.
frozen?: Sets the ComponentMetaData.frozen? attribute after initialization.
from-string: parses comma-separated keyword/value pairs from string in Curl source form. For example,

{ComponentMetaData
    from-string = |"name = "A", version = "1.0""|
}
copy-from: If not null, meta-data will be copied from specified object.
...: Some number of keyword/value pairs. These may either be specified as keyword arguments or as a string followed by a value. The latter is required for meta-data names that are not simple identifiers. For example:

{new ComponentMetaData,
     version="1.2",
     "my.private-info", 42
}


Property Details
author (accessor)
accessor public sealed ComponentMetaData.author:#String
setter public sealed ComponentMetaData.author:#String

The name of the author of this component.



cache-duration (accessor)
accessor public sealed ComponentMetaData.cache-duration:Time
setter public sealed ComponentMetaData.cache-duration:Time

Amount of time component may be cached without doing out-of-date checks.

Description

Indicates how long the component may be cached, either in memory or on disk, without checking to see if it is out-of-date with respect to its underlying sources. This attribute is currently only relevant for Curl packages and manifests.

Negative durations are ignored and are used to indicate no duration has been set.


compilation-time (accessor)
accessor public sealed inline ComponentMetaData.compilation-time:#DateTimeData
setter public sealed ComponentMetaData.compilation-time:#DateTimeData

Timestamp identifying start of compilation of component.

Description

Generated automatically by the compiler for Packages.


component-type (accessor)
accessor public sealed inline ComponentMetaData.component-type:#String
setter public sealed ComponentMetaData.component-type:#String

Identifies the type of component.

Description

This is set automatically in many cases:



content-id (accessor)
accessor public sealed inline ComponentMetaData.content-id:#ComponentID
setter public sealed ComponentMetaData.content-id:#ComponentID

A unique, secure content-identifier for the component.

Description

For Packages, this is automatically generated by the system based on the contents.


content-size (accessor)
accessor public sealed inline ComponentMetaData.content-size:int
setter public sealed ComponentMetaData.content-size:int

The size of the component.

Description

This is automatically computed for Curl packages, applets, and scripts by the system. The units depend on the file-format:



Note that counts of characters in Curl package or script source does not include top-level (i.e., not inside of any curly braces) white space or comments. So the following two packages would produce the same content-size:

{curl 6.0 package}
{package FOO}

|| This will be ignored

{define-proc public {foo}:void}


{curl 6.0 package}
{package FOO}
{define-proc public {foo}:void}


copyright (accessor)
accessor public sealed ComponentMetaData.copyright:#String
setter public sealed ComponentMetaData.copyright:#String

Copyright message for component.



curl-api-version (accessor)
accessor public sealed inline ComponentMetaData.curl-api-version:#VersionNumber
setter public sealed ComponentMetaData.curl-api-version:#VersionNumber

The API version from the curl herald used to compile component.

Description

This is automatically computed from the curl herald and will be the version from curl-versions that matches the Curl API version used to compile the code.

This could be an extended version number, such as "3.0.4+". To obtain the actual API version, use this to match against the versions in get-installed-api-versions:

{if-non-null my-version = meta-data.curl-api-version then
    {for installed-version in {get-installed-api-versions} do
        {if {my-version.partial-match? installed-version} then
            let my-installed-version:VersionNumber =
                installed-version
            ...
            {break}
        }
    }
}


Alternately, you can simply truncate the version number to two components:

{if-non-null my-version = meta-data.curl-api-version then
    let my-installed-version:VersionNumber =
        {my-version.n-clone n = 2}
    ...
}


curl-file-signatures (accessor)
accessor public sealed ComponentMetaData.curl-file-signatures:#ReadOnlyStringArray
setter public sealed ComponentMetaData.curl-file-signatures:#ReadOnlyStringArray

Contents of curl-file-signatures in this component.

Description

Computed automatically for applets, packages, manifests and scripts, and contains the contents of each curl-file-signature appearing in the component. The contents are stripped of all whitespace.


curl-versions (accessor)
accessor public sealed ComponentMetaData.curl-versions:#{ReadOnlyArray-of VersionNumber}
setter public sealed ComponentMetaData.curl-versions:#{ReadOnlyArray-of VersionNumber}

List of Curl versions in which the component may be used.

Description

This is automatically taken from the curl expression used in the source file for the component.


debuggable? (accessor)
accessor public sealed inline ComponentMetaData.debuggable?:bool
setter public sealed ComponentMetaData.debuggable?:bool

Indicates whether component is debuggable. Defaults to false.

Description

This is set automatically by the compiler for Packages.


default-locale (accessor)
accessor public sealed ComponentMetaData.default-locale:#String
setter public sealed ComponentMetaData.default-locale:#String

Default locale for component

Description

Specified in applet or package declarations to identify the default locale for resource location.

See find-resource for how this used.
Introduced in: version 6.0


file (accessor)
accessor public sealed ComponentMetaData.file:#String
setter public sealed ComponentMetaData.file:#String

Abstract file name of a resource.

Description

The abstract name of a resource listing in a manifest.

This is set in component declarations for resources listed in a manifest for use by find-resource and its related syntaxes (resource-url, localize-url, and host-localize-url).
Introduced in: version 6.0


file-format (accessor)
accessor public sealed inline ComponentMetaData.file-format:#String
setter public sealed ComponentMetaData.file-format:#String

The file format of the component.

Description

This is automatically generated for Curl components. Possible values are:



files (accessor)
accessor public sealed ComponentMetaData.files:#{ReadOnlyArray-of String}
setter public sealed ComponentMetaData.files:#{ReadOnlyArray-of String}

List of filenames included in the component.



frozen? (field)
public-get hidden-set ComponentMetaData.frozen?:bool

Indicates if object is "frozen".

Description

When the meta-data object is frozen, any attempt to change meta-data values will result in an error.


id (accessor)
accessor public sealed inline ComponentMetaData.id:#ComponentID
setter public sealed ComponentMetaData.id:#ComponentID

The unique identifier for the component.

Description

For Packages, this is automatically generated by the compiler based on the contents of the source code.


jit-compilable? (accessor)
accessor public sealed inline ComponentMetaData.jit-compilable?:bool
setter public sealed ComponentMetaData.jit-compilable?:bool

Indicates whether component may be JIT-compiled. Defaults to true.



jit-compiled? (accessor)
accessor public sealed inline ComponentMetaData.jit-compiled?:bool
setter public sealed ComponentMetaData.jit-compiled?:bool

Indicates whether component was JIT-compiled. Defaults to true.

Description

This is set automatically by the compiler.


license (accessor)
accessor public sealed ComponentMetaData.license:#String
setter public sealed ComponentMetaData.license:#String
This item is unsupported and reserved for internal use.


locale (accessor)
accessor public sealed ComponentMetaData.locale:#String
setter public sealed ComponentMetaData.locale:#String

Identifies the locale of the component.

Description

For runnable components such as applets or scripts, this is used to determine the initial working locale of the program. See set-working-locale.

For other types of components, such as packages and manifests, specifying this attribute will not affect the working locale but may be used to indicate the locale for which the component is intended to be used.

Also see ComponentMetaData.matches? for special matching rules for this attribute.


manifest (accessor)
accessor public sealed ComponentMetaData.manifest:#String
setter public sealed ComponentMetaData.manifest:#String

The location of the manifest associated with this component.

Description

The location of the component manifest associated with this component, if any. This must be an absolute URL string.

For applets and scripts, this identifies the location of the default manifest returned by get-default-manifest.

For packages, this is only used to locate the default manifest if the package was imported with an explicit location and no entry for the package could be found using the manifest used by the importing code (see example).

Note that when this value results from setting the corresponding keyword in the component declaration (e.g. applet), then any string value will interpreted as a potentially a path relative to the main file:

{curl 6.0 applet}
{applet
    manifest = "my-manifest.mcurl"
}
{assert {abs-url? {non-null {this-package}.meta-data.manifest}}}

Example

In the following example, the manifest declaration in package B allows it to use the manifest to locate package A, even though the applet does not use a manifest and imports B using an explicit location. If the applet were to declare a different manifest containing an entry for B, then B's manifest declaration would be ignored.

|| manifest.mcurl
{curl 6.0 manifest}
{component package A, location = "a.scurl"}
{component package B, location = "b.scurl"}


|| a.scurl
{curl 6.0 package}
{package A, manifest = "manifest.mcurl"}
...


|| b.scurl
{curl 6.0 package}
{package B, manifest = "manifest.mcurl"}
{import A} || no explicit location given
...


|| applet.curl
{curl 6.0 applet}
{import B, location = "b.scurl"}
...


name (accessor)
accessor public sealed inline ComponentMetaData.name:#String
setter public sealed ComponentMetaData.name:#String

The name of the component.

Description

This is the name used when the component was defined.


origin-url-names (accessor)
accessor public sealed ComponentMetaData.origin-url-names:#ReadOnlyStringArray
setter public sealed ComponentMetaData.origin-url-names:#ReadOnlyStringArray

List of URLs of possible sources for this component.

Description

Includes the actual source-url-name from which the component was loaded, but may also list additional locations from which an identical component has been loaded.

Only privileged processes may access this attribute on frozen meta-data objects, otherwise a null will be returned.

For packages, this is set automatically at compilation time.


package-caching-style (accessor)
accessor public sealed ComponentMetaData.package-caching-style:#String
setter public sealed ComponentMetaData.package-caching-style:#String

Package caching style for this component.

Description

This attribute is only applicable for runnable components such as applets or scripts. It specifies the manner in which persistent package caching is utilized for that program.

Persistent package caching (introduced in version 3.0 of the Curl API) causes packages to be cached persistently on disk so they may be loaded quickly in subsequent sessions. Caching can be disabled in the Curl Control Panel's General tab. The default setting is enabled.

Possible values are:

"lazy" (default)
Packages previously saved in the cache may be used, while new packages will be saved "lazily" in the background. This is the best caching style for most applications, and will usually result in all packages being cached by the time the application exits.
"on-import"
Packages are always added to the cache immediately before use. This results in slower initial startup time when packages have not yet been cached.
"read-only"
Packages previously saved in the cache may be used, but no new ones will be added.
"none"
Disables use of persistent package cache for this program.


To use a setting other than the default, set this attribute in the applet (or script) declaration, for example:

{curl 6.0 applet}
{applet 
    || Disable persistent package caching.
    package-caching-style = "none"
}

Programming Notes



release-notes (accessor)
accessor public sealed ComponentMetaData.release-notes:#String
setter public sealed ComponentMetaData.release-notes:#String

Release notes for this component.



release-timestamp (accessor)
accessor public sealed ComponentMetaData.release-timestamp:#DateTimeData
setter public sealed ComponentMetaData.release-timestamp:#DateTimeData

Release date and time of component.



requires-privilege? (accessor)
accessor public final ComponentMetaData.requires-privilege?:bool
setter public final ComponentMetaData.requires-privilege?:bool

Whether component requires privilege to use.

Description

When set to true in a package declaration, this will prevent the package from being imported when the current process (e.g. applet or script) is not privileged. Indirect non-privileged imports will also be disallowed.


resource-directory (accessor)
accessor public sealed ComponentMetaData.resource-directory:#String
setter public sealed ComponentMetaData.resource-directory:#String

Specifies root directory containing resources for component.

Description

This is used in package and applet declarations to specify the root directory for translations and other resources.

See find-resource and Specifying the Translation File for more on how this is used.
Introduced in: version 6.0


resync-as-of (accessor)
accessor public sealed ComponentMetaData.resync-as-of:#DateTimeData
setter public sealed ComponentMetaData.resync-as-of:#DateTimeData

Resynchronization time for component

Description

When specified in the meta-data for an applet, script or manifest this attribute may be used to set the value of process-resync-as-of, which will force files and components loaded by the applet or script to be synchronized as of the specified time.

When set in applet or script declarations, the utc-date-time syntax is usually used, such as:

{applet
    resync-as-of = {utc-date-time "2003-10-11"}
}


See documentation for the applet declaration for more examples.


SHA-1-digest (accessor)
accessor public sealed ComponentMetaData.SHA-1-digest:#SHA-1-Digest
setter public sealed ComponentMetaData.SHA-1-digest:#SHA-1-Digest

The SHA-1 digest of a file.

Description

The SHA-1 digest of the file (not necessarily the component) at a given location (see ComponentSelector.location-hints).

Returns null if not set.

Also see ComponentManifest.SHA-1-digest-for-location.


source-url (accessor)
accessor public final ComponentMetaData.source-url:#Url

Constructs a Url from ComponentMetaData.source-url-name.

Returns

absolute URL or null if source-url-name is null.

Description

Produces an error if source-url-name is not absolute.


source-url-name (accessor)
accessor public sealed ComponentMetaData.source-url-name:#String
setter public sealed ComponentMetaData.source-url-name:#String

A string containing the absolute Url of the source from which the component is compiled.

Description

This is set automatically at compilation time.


transitive-id (accessor)
accessor public sealed inline ComponentMetaData.transitive-id:#ComponentID
setter public sealed ComponentMetaData.transitive-id:#ComponentID

A unique id for the component that includes dependencies.

Description

The transitive id is computed from the local ComponentMetaData.id and the ids of all packages imported directly or indirectly by the component.


translations-file (accessor)
accessor public sealed ComponentMetaData.translations-file:#String
setter public sealed ComponentMetaData.translations-file:#String

Specifies name of file containing translations for component.

Description

This is used in package and applet declarations to specify the name of the translations file for the component.

See find-resource and Specifying the Translation File for more on how this is used.
Introduced in: version 6.0


version (accessor)
accessor public sealed inline ComponentMetaData.version:#VersionNumber
setter public sealed ComponentMetaData.version:#VersionNumber

The version of the component.

Description

When comparing using ComponentMetaData.matches?, version numbers use the VersionNumber.partial-match? method instead of simple equality. Thus a version number of "1.3" will match any version number that begins with "1.3".

This attribute may also hold ExtendedVersionNumber values to allow for extended matches. For instance, "1.2.3+" would match any versions of the form "1.2.n" where n is greater than or equal to 3.


Class Procedure Details
supported-value-type? (class proc)
public {ComponentMetaData.supported-value-type? type:Type}:bool

Indicates if type may be used as a meta-data value.

Description

The following types are supported as meta-data values:



This is invoked by ComponentMetaData.set.


Method Details
assert-match (method)
public sealed {ComponentMetaData.assert-match component:Component}:void

Throws ComponentMismatchError if the meta-data does not match that of component.



assert-not-frozen (method)
protected final {ComponentMetaData.assert-not-frozen}:void

Asserts that object is not frozen.

Description

Should be invoked prior to beginning any mutating operation on the object.


clone (method)
public sealed inline {ComponentMetaData.clone
    deep-copy?:bool = false
}:ComponentMetaData

Returns copy of object.

Description

The copy will not be frozen.


freeze (method)
public sealed inline {ComponentMetaData.freeze}:void

Freeze the meta-data so that it cannot be changed.

Description

Sets ComponentMetaData.frozen? to true.


get (method)
public sealed {ComponentMetaData.get key:String}:any

Get meta-data value for given key.

key: The name of the meta-data item. Must match a key that was previously used to set a value.

Returns

Returns the value associated with the key or throws a KeyNotFoundException.


get-if-exists (method)
public sealed {ComponentMetaData.get-if-exists
    key:String
}:(value:any, found?:bool)

Get meta-data value for given key.

key: The name of the meta-data item and a flag that indicates whether the requested item was found. Must match a key that was previously used to set a value.

Returns

Returns the value associated with the key or default.

Also returns a boolean which indicates if the element was found.


keys-to-Iterator (method)
public sealed inline {ComponentMetaData.keys-to-Iterator
}:{Iterator-of String}

Returns an iterator for the keys in the meta-data.

Description

Only returns keys for which values have been set.

This allows meta-data objects to be used in a keyed for-loop as in:

{for value:any key keyword:String in meta-data do
    ...
}


matches? (method)
public sealed {ComponentMetaData.matches?
    other:ComponentMetaData
}:(match?:bool, first-non-match:#String)

Indicates if other matches attributes of current object.

Returns

a bool indicating whether there was a match, and the name of the first meta-data value that does not match.

Description

The other is considered a match if for each meta-data value set in the current object, the corresponding element in other has the same value.

For values of type VersionNumber, the VersionNumber.partial-match? method is used instead of a simple equality comparison.

For values of type {ReadOnlyArray-of VersionNumber}, the VersionNumber.partial-match? method is used to verify that each version number in the array for this object is a partial match for one in the array for other.

Other types of ReadOnlyArray-of values simply use ReadOnlyArray-of.equal?.

A special exception is made for the curl-api-version: if it is not defined in the other object, then a match will still be allowed if a matching version number is found in the the other meta-data's curl-versions list.

Another exception is made for the "locale" attribute. In addition to an exact match, a locale string will also be considered a match if the other object's locale attribute is missing or null, is the value "default" or is the same as first part of the locale string upto a '.', '-', or '@' character. For instance, the locale string "en-US.UTF-8" will match "en-US.UTF-8", "en-US.UTF", "en-US", "en", "default" or a missing value. Also see ComponentSelector.compare for how locales affect the ordering of matches.


set (method)
public sealed {ComponentMetaData.set key:String, value:any}:void

Set meta-data value for key.

Description

Fails if ComponentMetaData.frozen? or if {ComponentMetaData.supported-value-type? {param value}} is false.

Setting null value is equivalent to invoking ComponentMetaData.unset.


set-meta-data (method)
protected sealed {ComponentMetaData.set-meta-data ...}:void

Sets meta-data from ...

Description

This is intended for use in constructors. See ComponentMetaData.default for description.


set? (method)
public sealed {ComponentMetaData.set? key:String}:bool

Indicates if value for key has been set.



unset (method)
public sealed inline {ComponentMetaData.unset key:String}:void

Unsets an existing value for key.

Description

If the key identifies an option, it will revert to its default value. No error is produced if value was not previously set. However, it is an error if ComponentMetaData.frozen?.