Class zebkit.Class.zObject <zebkit>

public <Function> $getSuper (name)

Get a first super implementation of the given method in a parent classes hierarchy.

  • name <String>

    a name of the method

Returns: <Function>

a super method implementation

public <Object> $super ([superMethod], [args])

Call super method implementation.

  • [superMethod] <Function>

    ? optional parameter that should be a method of the class instance that has to be called

  • [args] <Object> (*..n)

    arguments list to pass the executed method

Returns: <Object>

return what super method returns


var A = zebkit.Class([ function a(p) { return 10 + p; } ]);

var B = zebkit.Class(A, [ function a(p) { return this.$super(p) * 10; } ]);

var b = new B(); b.a(10) // return 200

public void extend ([interfaces], methods)

Extend existent class instance with the given methods and interfaces For example:

   var A = zebkit.Class([ // declare class A that defines one "a" method
       function a() {

   var a = new A();
   a.a();  // show "A:a()" message

       function b() {

       function a() {   // redefine "a" method

   a.b(); // show "EA:b()" message
   a.a(); // show "EA:a()" message

  • [interfaces] <zebkit.Interface> (*..n)

    interfaces to be implemented with the class instance

  • methods <Array>

    list of methods the class instance has to be extended with