(クラス)
コンストラクタ protected | {ComponentSelector.clone-from} |
コンストラクタ public | {ComponentSelector.default} |
アクセサ public final inline ComponentSelector.location-hints:#{
ReadOnlyArray-of Url}
prefer-jit?: | true の場合は JIT コンパイル コンポーネントが優先され、それ以外の場合は非 JIT コンパイル コンポーネントが優先されます。 |
フィールド deprecated public ComponentSelector.prefer-jit?:
bool プロパティ 継承 ComponentMetaData:
author, cache-duration, compilation-time, component-type, content-id, content-size, copyright, curl-api-version, curl-file-signatures, curl-versions, debuggable?, default-locale, file, file-format, files, frozen?, id, jit-compilable?, jit-compiled?, license, locale, manifest, name, origin-url-names, package-caching-style, release-notes, release-timestamp, requires-privilege?, resource-directory, resync-adjust?, resync-as-of, resync-file, SHA-1-digest, source-url, source-url-name, transitive-id, translations-file, version
public constant ComponentSelector.ComparisonProc:
ProcType ={proc-type {s1:ComponentSelector, s2:ComponentSelector}:bool}
public | {ComponentSelector.prefer-first?}:bool |
public sealed | {ComponentSelector.add-location-hint new-hint:Url}:void |
compare: | 2 つのメタデータを比較してどちらの方がより一致しているかを判定します。 |
public sealed | {ComponentSelector.compare}:int |
freeze: | メタデータが変更できないようにこれをフリーズします。 |
public sealed | {ComponentSelector.freeze}:void |
public final | {ComponentSelector.load-component-from}:(component:#Component, reject-count:int) |
public sealed | {ComponentSelector.location-matches?}:(match?:bool, first-non-match:#String) |
select: | 優先されるコンポーネント ローダーをリストから選択します。 |
public final | {ComponentSelector.select loaders:{Array-of ComponentLoader},accept-loader?:{proc-type {ComponentLoader}:bool} = ComponentSelector.accept-loader }:(loader:#ComponentLoader, reject-count:int) |
public final | {ComponentSelector.select-loader-from}:(loader:#ComponentLoader,reject-count:int) |
(コンストラクタ)
protected | {ComponentSelector.clone-from} |
other のクローンとしてセレクタを作成します。
(コンストラクタ)
public | {ComponentSelector.default} |
セレクタを初期化します。
prefer-jit?: 対応する属性を設定します。
frozen?: 対応する
frozen? 属性を設定します。これを true に設定すると、セレクタが作成後に変更されることを防ぎます。
from-string:
Curl のソース フォーム内の文字列から、カンマ区切りのキーワード/値のペアを解析します。次に例を示します。
{ComponentSelector
from-string = |"name = "A", version = "1.0""|
}
name: 対応する
name メタデータ属性を設定します。
version: 対応する
version メタデータ属性を設定します。
...:
ComponentMetaData.default で受け取られるフォーマットと同じキーワード / 値のペア
location キーワードは特別に処理されます。これは、セレクタの追加される場所のヒントを指定する
Url である必要があります。複数回指定することができます。
(アクセサ)
アクセサ public final inline ComponentSelector.location-hints:#{
ReadOnlyArray-of Url}
コンポーネントが存在する可能性のある場所を識別する Url のリスト。
(フィールド)
deprecated public ComponentSelector.prefer-jit?:
bool true の場合は JIT コンパイル コンポーネントが優先され、それ以外の場合は非 JIT コンパイル コンポーネントが優先されます。
非推奨
このフィールドは使用しないでください。
(クラス定数)
public constant ComponentSelector.ComparisonProc:
ProcType ={proc-type {s1:ComponentSelector, s2:ComponentSelector}:bool}
(クラスプロシージャ)
public | {ComponentSelector.prefer-first?}:bool |
first-selector が second-selector より優先されるどうかを示します。
説明
(メソッド)
public sealed | {ComponentSelector.add-location-hint new-hint:Url}:void |
(メソッド)
(メソッド)
public sealed | {ComponentSelector.compare}:int |
2 つのメタデータを比較してどちらの方がより一致しているかを判定します。
戻り値
次のような値を返します。
- 0 より小さい値:最初のメタデータの方が優先される場合。
- 0:両方とも等しく優先される場合。
- 0 より大きい値:2 番目のメタデータの方が優先される場合。
説明
この比較機能の優先順位は次のとおりです。
- 最新バージョンの項目
- 最も明確なロケールの項目
- コンパイル時間が最初の項目
- 優先 jit-compiled? 設定の項目
ロケール名の明確さを最も低いものから順に並べると次のようになります。
- null または欠落している
- 値 "default"
- 言語のみ、つまり "en" のように、ハイフンを含まない名前
- 言語と国名、つまり "en-US" のようにハイフンを最低 1 つ含む名前
(メソッド)
public sealed | {ComponentSelector.freeze}:void |
メタデータが変更できないようにこれをフリーズします。
説明
(メソッド)
public final | {ComponentSelector.load-component-from}:(component:#Component, reject-count:int) |
locator を使用して、このセレクタのコンポーネントを検索してロードします。
説明
(メソッド)
public sealed | {ComponentSelector.location-matches?}:(match?:bool, first-non-match:#String) |
メタデータと場所のヒントが other に一致するかどうかを示します。
戻り値
一致したかどうかを示す
bool、および一致しない最初のメタデータの値の名前。場所のヒントと一致しなかった場合、この名前は "location" になります。
説明
ComponentMetaData.matches? を呼び出し、true の場合は
other に対して場所のヒントを照合します。一致するには、場所のヒントの 1 つが
other の
source-url-name か、または
origin-url-names の 1 つと一致する必要があります。
(メソッド)
public final | {ComponentSelector.select loaders:{Array-of ComponentLoader},accept-loader?:{proc-type {ComponentLoader}:bool} = ComponentSelector.accept-loader }:(loader:#ComponentLoader, reject-count:int) |
優先されるコンポーネント ローダーをリストから選択します。
戻り値
優先されるコンポーネント ローダー。loaders が空の場合は null。
説明
ローダーのメタデータで
compare を使用して、優先されるローダーを決定します。2 つのローダーの優先順位が同じ場合、リストで最初に登場するものが優先されます。このメソッドは、準備が完了していないローダーは選択しません (
ComponentLoader.ready? を参照してください)。
(メソッド)
public final | {ComponentSelector.select-loader-from}:(loader:#ComponentLoader,reject-count:int) |