A class whose instances act as a facade for other objects.
Note: If a class returns a facade in its constructor, only the defined functions will be visible, no internals of the class can be accessed.
Constructs a facade for the given object, containing only the named methods.
For each method named in aMethods
, a wrapper function will be added to the facade. When called, the wrapper function calls the method with the same name in the original oObject
, passing all its call parameters to it without modification. A return value of the original method will be returned to the caller. Before returning it, values of type sap.ui.base.Object
will be replaced by their facades, calling getInterface on them.
It is possible to create different facades exposing different sets of methods for the same object, but as getInterface
can only return one of those interfaces, the special handling of the return values doesn't support multiple facades per object.
new sap.ui.base.Interface(oObject, aMethods)
Param | Type | Default Value | Description |
---|---|---|---|
oObject | sap.ui.base.Object | Object for which a facade should be created |
|
aMethods | string[] | Names of the methods, that should be available in the new facade |