Top Description Methods
org.graalvm.nativebridge

public @Interface Out

extends Annotation
Annotations
@Retention:CLASS
@Target:PARAMETER
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Configures an array parameter as an out-parameter. For an out-parameter, the array value is copied over the boundary from a called method. It may be combined with In for in-out parameters. Example showing the configuration for java.io.OutputStream#write(byte[], int, int).
@Override
public abstract int read(@Out(arrayOffsetParameter = "off", arrayLengthParameter = "len", trimToResult = true) byte[] b, int off, int len);

Method Summary

Modifier and TypeMethod and Description
public String
arrayLengthParameter()

Limits copying only to many of the elements given by the arrayLengthParameter parameter.

public String
arrayOffsetParameter()

Copy only a part of the array starting at offset given by the arrayOffsetParameter method parameter.

public boolean
trimToResult()

Limits copying only to method result number of elements.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

arrayLengthParameterback to summary
public String arrayLengthParameter()

Limits copying only to many of the elements given by the arrayLengthParameter parameter. By default, the whole array is copied. The arrayLengthParameter can be used to improve the performance and copy only a part of the array over the boundary.

arrayOffsetParameterback to summary
public String arrayOffsetParameter()

Copy only a part of the array starting at offset given by the arrayOffsetParameter method parameter. By default, the whole array is copied. The arrayOffsetParameter can be used to improve the performance and copy only a part of the array over the boundary.

trimToResultback to summary
public boolean trimToResult()

Limits copying only to method result number of elements. It can be used to further limit the number of copied elements in addition to arrayLengthParameter. When used, it's still good to specify arrayLengthParameter as an upper bound to limit allocated array size.