調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >レジストリ >getClass
registry.getClass() 関数
指定の名前と型のクラスを取得します。
署名:
export declare function getClass<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): (new (...p1: any[]) => T) | null;
パラメータ
パラメータ |
型 |
説明 |
type |
文字列 |型<T> |
プラグインのタイプ。(フィールド、レンダラなど) |
name |
文字列 |
プラグインの名前。(例: field_angle、geras) |
opt_throwIfMissing |
ブール値 |
(省略可)プラグインが見つからない場合にエラーをスローするかどうか。 |
戻り値:
(new (...p1: any[]) => T) |null
指定された名前と型のクラス。存在しない場合は null。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-22 UTC。
[null,null,["最終更新日 2024-08-22 UTC。"],[[["The `registry.getClass()` function retrieves the class associated with a specific name and type from the Blockly registry."],["It requires the plugin's type (like 'Field' or 'Renderer') and name as input."],["An optional boolean parameter controls whether an error is thrown if the plugin is not found."],["The function returns the corresponding class if found, otherwise it returns null."]]],[]]