TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 265

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 265', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | This class allows for easy implementation of the Delegator design pattern. Required Library require delegate Inherited Class Delegator Class Method SimpleDelegator new obj Creates an object that forwards methods to obj Instance Method setobj__ Sets the object to which methods are forwarded DelegatorClass Class creation function for Delegator patterns This function dynamically creates a class that delegates to other fixed classes. Required Library require delegate Function DelegateClass c Creates a new class to which the methods of class c are forwarded Method of Generated Class D new obj Creates a delegate object with obj as the object to which methods are forwarded Module to add selected method delegations to a Forwardable class The Forwardable module provides more explicit method delegation. You can specify method name and destination object explicitly. Required Library require forwardable Example class Foo extend Forwardable . def_delegators @out printf print def_delegators @in gets def_delegator @contents content_at end f hello world n forward to @ forward to @ f. content_at 1 forward to @contents. Instance Methods def_delegator accessor method alt method def_instance_delegator accessor method alt method Defines delegation from method to accessor. If alt is specified alt method is called instead of method. def_delegators accessor method. def_instance_delegators accessor method. Defines delegation to accessor for each method. SingleForwardable Selective delegation module The SingleForwardable module provides more explicit method delegation for a specific object. Required Library require forwardable Example require forwardable . g SingleForwardable @out puts hello world forward to @ Instance Methods def_singleton_delegator accessor method alt method def_delegator accessor method alt method Defines delegation from method to accessor. If alt is specified alt method is called

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.