연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
blockly > fieldRegistry > RegistrableField
fieldRegistry.RegistrableField 인터페이스
등록된 모든 필드(즉, 생성자 및 fromJson 메서드)에서 정의해야 하는 정적 메서드를 나타냅니다.
어떤 Field 서브클래스가 등록될지 알 수 없기 때문에 생성자의 매개변수를 형식 확인할 수 없습니다.
서명:
export interface RegistrableField
메서드
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-04(UTC)
[null,null,["최종 업데이트: 2024-11-04(UTC)"],[[["The `RegistrableField` interface outlines the necessary static methods for registering a field in Blockly, specifically the constructor and `fromJson` methods."],["Due to the dynamic nature of field registration, type checking the constructor's parameters is not feasible, as the specific Field subclass being registered is unknown."],["This interface ensures that all registered fields adhere to a standardized structure, enabling consistent field creation and JSON deserialization within Blockly."]]],["The `RegistrableField` interface defines the required static methods for any registered field in the Blockly `fieldRegistry`. It mandates the presence of a constructor (`new`) and a `fromJson` method. Due to the dynamic nature of field registration, the constructor's parameter types cannot be checked. These methods are essential for creating new field instances and loading fields from JSON configurations, respectively. This interface ensures all fields can be registered and utilized.\n"]]