API / geotoolkit / lib
Functions
Functions
▸ obfuscate<T>(klass): T
Assign the corresponding obfuscated names to the public ones inherited from the super.
Each extended GeoToolkit class that overrides any method must call this function to map obfuscated names to the public API, otherwise the overridden methods in the subclass cannot be called properly.
Note that if implementsInterface() or setClassName() is also used, obfuscate() should be called lastExample
// How to use obfuscate function
import {obfuscate} from '@int/geotoolkit/lib';
export class MyShape extends Shape {
public override render (context: RenderingContext) {
}
}
obfuscate(MyShape);Example
import {LogMarker} from '@int/geotoolkit/welllog/LogMarker';
import {ILayoutElement1D} from '@int/geotoolkit/layout/ILayoutElement1D';
import {implementsInterface} from '@int/geotoolkit/base';
import {obfuscate} from '@int/geotoolkit/lib';
export class CustomMarker extends LogMarker {
getValue () {
return this.getDepth();
}
}
implementsInterface(CustomMarker, ILayoutElement1D);
obfuscate(CustomMarker);| Name | Type |
|---|---|
T | extends object |
| Name | Type | Description |
|---|---|---|
klass | T | class instance |
T