סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > מרשם > getClass
הפונקציה segment.getClass()
הפונקציה מקבלת את המחלקה לפי השם והסוג הנתונים.
Signature:
export declare function getClass<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): (new (...p1: any[]) => T) | null;
פרמטרים
פרמטר |
סוג |
תיאור |
סוג |
מחרוזת | סוג<T> |
סוג הפלאגין. (למשל: שדה, מעבד) |
שם |
מחרוזת |
שם הפלאגין. (לדוגמה: field_angle, geras) |
opt_throwIfMissing |
בוליאני |
(אופציונלי) האם להקפיץ הודעת שגיאה אם אנחנו לא מצליחים למצוא את הפלאגין. |
החזרות:
(new (...p1: any[]) => T) | null
המחלקה עם השם והסוג הנתונים או ערך null אם לא קיים כזה.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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."]]],[]]