封鎖 >CodeGenerator >isInitialized
CodeGenerator.isInitialized 屬性
是否呼叫了 init 方法。如果發電機在建立後將這個旗標設為 false,在 init 設為 true,則當產生器尚未初始化時,blockToCode 將發出警示。如果未變更這個標記,就不會有任何作用。
Signature:
isInitialized: boolean | null;
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["`CodeGenerator.isInitialized` is a property that indicates if a code generator has been initialized."],["This property is used to trigger warnings if `blockToCode` is called before the generator's `init` method."],["Generators can manage this flag to control initialization-related warnings, ensuring proper usage."]]],["The `isInitialized` property, found within the `CodeGenerator` class, indicates if the generator's `init` method has been executed. It's a boolean or null value. When set to `false` and then `true` during initialization, it triggers a warning during `blockToCode` if the generator is not initialized. Leaving the flag untouched has no effect. It ensures that a warning is triggered if the generator is not initialized before being used.\n"]]