PP.getAllInterfaceMembers

Syntax

getAllInterfaceMembers(intfs: Array);

Parameters

intfs. Array of interfaces, members of which will be returned.

Description

The getAllInterfaceMembers method returns the array of interface members.

Comments

This method returns an array of JSON objects with the following properties: Name - name of interface member, Type - member type, defined using the PP.ClassMembers interface.

The returned method value also includes members of base interfaces.

Example

To execute the example, add a link to PP.js scenario file to HTML page. Determine properties, methods and events for the PP.ISourceView interface:

// Declare array of properties, methods and events
var properties = [],
    methods = [],
    events = [];
// Get all members of the PP.ISourceView interface
var members = PP.getAllInterfaceMembers([PP.ISourceView]);
for (i = 0; i < members.length; i++) {
    // Perform access by all members of the interface
    var member = members[i].Name;
    switch (members[i].Type) {
        case PP.ClassMembers.Property:
            /* If the current interface member is a property,
               add it to the array of properties */
            properties.push(member);
            break;
        case PP.ClassMembers.Method:
            /* if the current interface member is a method, 
               add it ot the array of methods */
            methods.push(member);
            break;
        case PP.ClassMembers.Event:
            /* If the current interface member is an event,
               add it to the array of events */
            events.push(member);
            break;
    };
};
// Output names of interface properties, methods and events
console.log("Properties: " + properties.toString());
console.log("Methods: " + methods.toString());
console.log("Events: " + events.toString());

After executing the example browser console displays properties, methods and events declared in the PP.ISourceView interface:

Properties: Source
Methods: refreshAll,refresh
Events: PropertyChanged,RequestMetadata

See also:

PP