API / geotoolkit / lib

Module: lib

Table of contents

Functions

Contents

Functions

obfuscate

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 last

Example

// 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);

Type parameters

NameType
Textends object

Parameters

Name Type Description
klassTclass instance

Returns

T