| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends CEntryPointOptions.Epilogue> |
epilogue
Specifies a class with epilogue code that is executed when the entry point method returns to
C in order to leave the execution context.
|
Class<? extends Function<String,String>> |
nameTransformation
A function that is passed the name provided with
CEntryPoint.name() and returns
another string that will be used for the entry point's symbol name. |
Class<? extends CEntryPointOptions.Prologue> |
prologue
Specifies a class with prologue code that is executed when the entry point method is called
from C in order to establish an execution context.
|
Class<? extends CEntryPointOptions.PrologueBailout> |
prologueBailout
Specifies a class that is used when an early bailout occurs in the prologue.
|
CEntryPointOptions.Publish |
publishAs |
public abstract Class<? extends Function<String,String>> nameTransformation
CEntryPoint.name() and returns
another string that will be used for the entry point's symbol name. A common use is to add
prefixes or suffixes to entry point symbol names. When CEntryPoint.name() is not set,
the function is passed a string that contains the mangled class and method names.public abstract Class<? extends CEntryPointOptions.Prologue> prologue
CEntryPointOptions.AutomaticPrologue for the
default behavior and CEntryPointSetup for commonly used prologues.
The given class must have exactly one static method with parameters that are a subsequence of
the entry point method's parameters. In other words, individual parameters may be omitted,
but must be in the same order. The entry point method's parameters are matched to the
prologue method's parameters. The prologue method must be Uninterruptible and its
return type must either be int or void.
If the return type is an integer, then a return value of zero indicates success. A non-zero
return value indicates a failure, and will result in early bailout. The value that is
returned by the early bailout can be customized by specifying a class for
CEntryPointOptions.prologueBailout().
A void return type indicates that the prologue method directly handles errors (e.g., by
calling CEntryPointActions.failFatally(int, org.graalvm.nativeimage.c.type.CCharPointer)), so no extra bailout-related code will be
generated.
public abstract Class<? extends CEntryPointOptions.PrologueBailout> prologueBailout
Uninterruptible method with an int argument. This method
is invoked if the prologue methods returns a non-zero value.public abstract Class<? extends CEntryPointOptions.Epilogue> epilogue
CEntryPointSetup for commonly used
epilogues.
The given class must have exactly one static Uninterruptible method with no
parameters. Within the epilogue method, CEntryPointActions can be used to leave the
execution context.
public abstract CEntryPointOptions.Publish publishAs