This commit is contained in:
Volker Berlin 2022-06-19 14:04:21 +02:00
parent aa6a851db4
commit 2b27364466
No known key found for this signature in database
GPG Key ID: 988423EF815BE4CB

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2019 - 2021 Volker Berlin (i-net software) * Copyright 2019 - 2022 Volker Berlin (i-net software)
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,6 +31,7 @@ import de.inetsoftware.jwebassembly.module.TypeManager.StructTypeKind;
*/ */
public class ArrayType extends StructType { public class ArrayType extends StructType {
@Nonnull
private AnyType arrayType; private AnyType arrayType;
private AnyType nativeArrayType; private AnyType nativeArrayType;
@ -51,7 +52,7 @@ public class ArrayType extends StructType {
* @param options * @param options
* compiler properties * compiler properties
*/ */
public ArrayType( AnyType arrayType, @Nonnull TypeManager manager, int componentClassIndex, WasmOptions options ) { public ArrayType( @Nonnull AnyType arrayType, @Nonnull TypeManager manager, int componentClassIndex, @Nonnull WasmOptions options ) {
this( getJavaClassName( arrayType ), StructTypeKind.array, manager, arrayType ); this( getJavaClassName( arrayType ), StructTypeKind.array, manager, arrayType );
this.componentClassIndex = componentClassIndex; this.componentClassIndex = componentClassIndex;
if( options.useGC() ) { if( options.useGC() ) {
@ -76,7 +77,7 @@ public class ArrayType extends StructType {
* @param arrayType * @param arrayType
* the type of the array * the type of the array
*/ */
private ArrayType( @Nonnull String name, @Nonnull StructTypeKind kind, @Nonnull TypeManager manager, AnyType arrayType ) { private ArrayType( @Nonnull String name, @Nonnull StructTypeKind kind, @Nonnull TypeManager manager, @Nonnull AnyType arrayType ) {
super( name, kind, manager ); super( name, kind, manager );
this.arrayType = arrayType; this.arrayType = arrayType;
} }
@ -125,6 +126,7 @@ public class ArrayType extends StructType {
* The element type of the array * The element type of the array
* @return the type * @return the type
*/ */
@Nonnull
public AnyType getArrayType() { public AnyType getArrayType() {
return arrayType; return arrayType;
} }