연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
Blockly의 인터페이스
Blockly에서 인터페이스는 기본 객체를 대체하기 위해 객체가 구현해야 하는 함수를 설명합니다.
인터페이스를 구현하기 위해 특정 클래스에서 상속할 필요는 없습니다. 올바른 함수를 제공하고 인터페이스의 주석에 설명된 모든 요구사항을 준수하는 한 내부적으로 원하는 작업을 할 수 있습니다. 그러나 플러그인의 일반적인 패턴은 기본 클래스를 확장하고 변경하려는 함수만 재정의하는 것입니다.
유형 검사기에 특정 인터페이스를 구현한다는 것을 나타내려면 클래스에 @implements {InterfaceName}
주석을 답니다.
Blockly의 인터페이스는 core/interfaces에 정의되어 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2022-12-05(UTC)
[null,null,["최종 업데이트: 2022-12-05(UTC)"],[[["Blockly interfaces define functions objects must implement to replace default functionality."],["Implementing an interface doesn't require class inheritance, but adhering to function definitions and requirements is crucial."],["Annotate your class with `@implements {InterfaceName}` to indicate interface implementation to the type checker."],["While flexibility exists in implementation, extending the default class and overriding specific functions is a common pattern for plugins."],["Blockly's interface definitions are located in the `core/interfaces` directory of the repository."]]],[]]