SymbolName

The SymbolName aspect, available on the Island platform only, allows you to override the external name under which a global function will be exposed from a library or static library project. The aspect expects a single String parameter, the desired public name of the symbol.

Background

Any public and exported methods in a library will be made available as end points that can be called from external code using the library. By default, the public name will be determined by platform name mangling rules and will often not be identical to the local name seen in code.

Using the SymbolName aspect allows you to control the exact name your function will be published under.

Example

[SymbolName('testFunction')]
method test();
begin
  ...
end;
[SymbolName("testFunction")]
public void test()
{
    ...
}
@SymbolName("testFunction")
public func test() {
    ...
}
@SymbolName("testFunction")
public void test() 
{
    ...
}

Island Only

The SymbolName aspects is available on the Island platform only. Support for Cocoa is planned for a future update.

Defined in Island RTL

See Also