IConfigurable class abstract

An interface to set configuration parameters to an object.

It can be added to any existing class by implementing a single configure() method.

If you need to emphasis the fact that configure() method can be called multiple times to change object configuration in runtime, use IReconfigurable interface instead.

See ConfigParams

Example

class MyClass implements IConfigurable {
    var _myParam = 'default value';

    void configure(ConfigParams config) {
        _myParam = config.getAsStringWithDefault('options.param', myParam);
        ...
    }
}
Implementers

Constructors

IConfigurable()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

configure(ConfigParams config) → void
Configures component by passing configuration parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited