public interface Modifier
Represents a protection modifier on a module item. For example, all
declarations (e.g. functions, types, etc) can be marked as
public or private.
The modifiers native and export are used to enable
inter-operation with other languages. By declaring a function or method as
native you are signaling that its implementation is provided
elsewhere (e.g. it's implemented in Java code directly). By marking a
function or method with export, you are declaring that external
code may call it. For example, you have some Java code that needs to call it.
The modifier is required because, by default, all the names of all methods
and functions are mangled to include type information and enable
overloading. Therefore, a method/function marked with export
will generate a function without name mangling.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Modifier.Export |
static class |
Modifier.Native |
static class |
Modifier.Private |
static class |
Modifier.Public |
Copyright © 2017. All rights reserved.