Skip to content

Commit

Permalink
feat(core): migrate from jsr305 to JSpecify (generated)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrMilchmann authored and Spasi committed Nov 16, 2024
1 parent 06f23ed commit 2607557
Show file tree
Hide file tree
Showing 3,585 changed files with 15,736 additions and 23,517 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -136,8 +136,7 @@ public static AIAABB create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIAABB createSafe(long address) {
public static @Nullable AIAABB createSafe(long address) {
return address == NULL ? null : new AIAABB(address, null);
}

Expand Down Expand Up @@ -180,8 +179,7 @@ public static AIAABB.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIAABB.Buffer createSafe(long address, int capacity) {
public static AIAABB.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -118,23 +118,20 @@ public AIAnimation(ByteBuffer container) {
@NativeType("unsigned int")
public int mNumChannels() { return nmNumChannels(address()); }
/** The node animation channels. Each channel affects a single node. The array is {@code mNumChannels} in size. */
@Nullable
@NativeType("struct aiNodeAnim **")
public PointerBuffer mChannels() { return nmChannels(address()); }
public @Nullable PointerBuffer mChannels() { return nmChannels(address()); }
/** The number of mesh animation channels. Each channel affects a single mesh and defines vertex-based animation. */
@NativeType("unsigned int")
public int mNumMeshChannels() { return nmNumMeshChannels(address()); }
/** The mesh animation channels. Each channel affects a single mesh. The array is {@code mNumMeshChannels} in size. */
@Nullable
@NativeType("struct aiMeshAnim **")
public PointerBuffer mMeshChannels() { return nmMeshChannels(address()); }
public @Nullable PointerBuffer mMeshChannels() { return nmMeshChannels(address()); }
/** the number of mesh animation channels. Each channel affects a single mesh and defines morphing animation. */
@NativeType("unsigned int")
public int mNumMorphMeshChannels() { return nmNumMorphMeshChannels(address()); }
/** the morph mesh animation channels. Each channel affects a single mesh. The array is {@code mNumMorphMeshChannels} in size. */
@Nullable
@NativeType("struct aiMeshMorphAnim **")
public PointerBuffer mMorphMeshChannels() { return nmMorphMeshChannels(address()); }
public @Nullable PointerBuffer mMorphMeshChannels() { return nmMorphMeshChannels(address()); }

/** Copies the specified {@link AIString} to the {@link #mName} field. */
public AIAnimation mName(@NativeType("struct aiString") AIString value) { nmName(address(), value); return this; }
Expand Down Expand Up @@ -206,8 +203,7 @@ public static AIAnimation create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIAnimation createSafe(long address) {
public static @Nullable AIAnimation createSafe(long address) {
return address == NULL ? null : new AIAnimation(address, null);
}

Expand Down Expand Up @@ -250,8 +246,7 @@ public static AIAnimation.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIAnimation.Buffer createSafe(long address, int capacity) {
public static AIAnimation.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down Expand Up @@ -323,15 +318,15 @@ public static AIAnimation.Buffer calloc(int capacity, MemoryStack stack) {
/** Unsafe version of {@link #mNumChannels}. */
public static int nmNumChannels(long struct) { return memGetInt(struct + AIAnimation.MNUMCHANNELS); }
/** Unsafe version of {@link #mChannels() mChannels}. */
@Nullable public static PointerBuffer nmChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MCHANNELS), nmNumChannels(struct)); }
public static @Nullable PointerBuffer nmChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MCHANNELS), nmNumChannels(struct)); }
/** Unsafe version of {@link #mNumMeshChannels}. */
public static int nmNumMeshChannels(long struct) { return memGetInt(struct + AIAnimation.MNUMMESHCHANNELS); }
/** Unsafe version of {@link #mMeshChannels() mMeshChannels}. */
@Nullable public static PointerBuffer nmMeshChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MMESHCHANNELS), nmNumMeshChannels(struct)); }
public static @Nullable PointerBuffer nmMeshChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MMESHCHANNELS), nmNumMeshChannels(struct)); }
/** Unsafe version of {@link #mNumMorphMeshChannels}. */
public static int nmNumMorphMeshChannels(long struct) { return memGetInt(struct + AIAnimation.MNUMMORPHMESHCHANNELS); }
/** Unsafe version of {@link #mMorphMeshChannels() mMorphMeshChannels}. */
@Nullable public static PointerBuffer nmMorphMeshChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MMORPHMESHCHANNELS), nmNumMorphMeshChannels(struct)); }
public static @Nullable PointerBuffer nmMorphMeshChannels(long struct) { return memPointerBufferSafe(memGetAddress(struct + AIAnimation.MMORPHMESHCHANNELS), nmNumMorphMeshChannels(struct)); }

/** Unsafe version of {@link #mName(AIString) mName}. */
public static void nmName(long struct, AIString value) { memCopy(value.address(), struct + AIAnimation.MNAME, AIString.SIZEOF); }
Expand Down Expand Up @@ -423,23 +418,20 @@ protected AIAnimation getElementFactory() {
@NativeType("unsigned int")
public int mNumChannels() { return AIAnimation.nmNumChannels(address()); }
/** @return a {@link PointerBuffer} view of the data pointed to by the {@link AIAnimation#mChannels} field. */
@Nullable
@NativeType("struct aiNodeAnim **")
public PointerBuffer mChannels() { return AIAnimation.nmChannels(address()); }
public @Nullable PointerBuffer mChannels() { return AIAnimation.nmChannels(address()); }
/** @return the value of the {@link AIAnimation#mNumMeshChannels} field. */
@NativeType("unsigned int")
public int mNumMeshChannels() { return AIAnimation.nmNumMeshChannels(address()); }
/** @return a {@link PointerBuffer} view of the data pointed to by the {@link AIAnimation#mMeshChannels} field. */
@Nullable
@NativeType("struct aiMeshAnim **")
public PointerBuffer mMeshChannels() { return AIAnimation.nmMeshChannels(address()); }
public @Nullable PointerBuffer mMeshChannels() { return AIAnimation.nmMeshChannels(address()); }
/** @return the value of the {@link AIAnimation#mNumMorphMeshChannels} field. */
@NativeType("unsigned int")
public int mNumMorphMeshChannels() { return AIAnimation.nmNumMorphMeshChannels(address()); }
/** @return a {@link PointerBuffer} view of the data pointed to by the {@link AIAnimation#mMorphMeshChannels} field. */
@Nullable
@NativeType("struct aiMeshMorphAnim **")
public PointerBuffer mMorphMeshChannels() { return AIAnimation.nmMorphMeshChannels(address()); }
public @Nullable PointerBuffer mMorphMeshChannels() { return AIAnimation.nmMorphMeshChannels(address()); }

/** Copies the specified {@link AIString} to the {@link AIAnimation#mName} field. */
public AIAnimation.Buffer mName(@NativeType("struct aiString") AIString value) { AIAnimation.nmName(address(), value); return this; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -189,8 +189,7 @@ public static AIBone create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIBone createSafe(long address) {
public static @Nullable AIBone createSafe(long address) {
return address == NULL ? null : new AIBone(address, null);
}

Expand Down Expand Up @@ -233,8 +232,7 @@ public static AIBone.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIBone.Buffer createSafe(long address, int capacity) {
public static AIBone.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -246,8 +246,7 @@ public static AICamera create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AICamera createSafe(long address) {
public static @Nullable AICamera createSafe(long address) {
return address == NULL ? null : new AICamera(address, null);
}

Expand Down Expand Up @@ -290,8 +289,7 @@ public static AICamera.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AICamera.Buffer createSafe(long address, int capacity) {
public static AICamera.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -92,8 +92,7 @@ public static AIColor3D create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIColor3D createSafe(long address) {
public static @Nullable AIColor3D createSafe(long address) {
return address == NULL ? null : new AIColor3D(address, null);
}

Expand All @@ -108,8 +107,7 @@ public static AIColor3D.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIColor3D.Buffer createSafe(long address, int capacity) {
public static AIColor3D.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -152,8 +152,7 @@ public static AIColor4D create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIColor4D createSafe(long address) {
public static @Nullable AIColor4D createSafe(long address) {
return address == NULL ? null : new AIColor4D(address, null);
}

Expand Down Expand Up @@ -196,8 +195,7 @@ public static AIColor4D.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIColor4D.Buffer createSafe(long address, int capacity) {
public static AIColor4D.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -108,9 +108,8 @@ public AIExportDataBlob(ByteBuffer container) {
@NativeType("struct aiString")
public AIString name() { return nname(address()); }
/** Pointer to the next blob in the chain or NULL if there is none. */
@Nullable
@NativeType("struct aiExportDataBlob *")
public AIExportDataBlob next() { return nnext(address()); }
public @Nullable AIExportDataBlob next() { return nnext(address()); }

/** Sets the address of the specified {@link ByteBuffer} to the {@link #data} field. */
public AIExportDataBlob data(@NativeType("void *") ByteBuffer value) { ndata(address(), value); return this; }
Expand Down Expand Up @@ -170,8 +169,7 @@ public static AIExportDataBlob create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIExportDataBlob createSafe(long address) {
public static @Nullable AIExportDataBlob createSafe(long address) {
return address == NULL ? null : new AIExportDataBlob(address, null);
}

Expand Down Expand Up @@ -214,8 +212,7 @@ public static AIExportDataBlob.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIExportDataBlob.Buffer createSafe(long address, int capacity) {
public static AIExportDataBlob.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down Expand Up @@ -285,7 +282,7 @@ public static AIExportDataBlob.Buffer calloc(int capacity, MemoryStack stack) {
/** Unsafe version of {@link #name}. */
public static AIString nname(long struct) { return AIString.create(struct + AIExportDataBlob.NAME); }
/** Unsafe version of {@link #next}. */
@Nullable public static AIExportDataBlob nnext(long struct) { return AIExportDataBlob.createSafe(memGetAddress(struct + AIExportDataBlob.NEXT)); }
public static @Nullable AIExportDataBlob nnext(long struct) { return AIExportDataBlob.createSafe(memGetAddress(struct + AIExportDataBlob.NEXT)); }

/** Sets the specified value to the {@code size} field of the specified {@code struct}. */
public static void nsize(long struct, long value) { memPutAddress(struct + AIExportDataBlob.SIZE, value); }
Expand Down Expand Up @@ -358,9 +355,8 @@ protected AIExportDataBlob getElementFactory() {
@NativeType("struct aiString")
public AIString name() { return AIExportDataBlob.nname(address()); }
/** @return a {@link AIExportDataBlob} view of the struct pointed to by the {@link AIExportDataBlob#next} field. */
@Nullable
@NativeType("struct aiExportDataBlob *")
public AIExportDataBlob next() { return AIExportDataBlob.nnext(address()); }
public @Nullable AIExportDataBlob next() { return AIExportDataBlob.nnext(address()); }

/** Sets the address of the specified {@link ByteBuffer} to the {@link AIExportDataBlob#data} field. */
public AIExportDataBlob.Buffer data(@NativeType("void *") ByteBuffer value) { AIExportDataBlob.ndata(address(), value); return this; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -162,8 +162,7 @@ public static AIExportFormatDesc create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIExportFormatDesc createSafe(long address) {
public static @Nullable AIExportFormatDesc createSafe(long address) {
return address == NULL ? null : new AIExportFormatDesc(address, null);
}

Expand Down Expand Up @@ -206,8 +205,7 @@ public static AIExportFormatDesc.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIExportFormatDesc.Buffer createSafe(long address, int capacity) {
public static AIExportFormatDesc.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -129,8 +129,7 @@ public static AIFace create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIFace createSafe(long address) {
public static @Nullable AIFace createSafe(long address) {
return address == NULL ? null : new AIFace(address, null);
}

Expand Down Expand Up @@ -173,8 +172,7 @@ public static AIFace.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIFace.Buffer createSafe(long address, int capacity) {
public static AIFace.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package org.lwjgl.assimp;

import javax.annotation.*;
import org.jspecify.annotations.*;

import java.nio.*;

Expand Down Expand Up @@ -193,8 +193,7 @@ public static AIFile create(long address) {
}

/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIFile createSafe(long address) {
public static @Nullable AIFile createSafe(long address) {
return address == NULL ? null : new AIFile(address, null);
}

Expand Down Expand Up @@ -237,8 +236,7 @@ public static AIFile.Buffer create(long address, int capacity) {
}

/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static AIFile.Buffer createSafe(long address, int capacity) {
public static AIFile.@Nullable Buffer createSafe(long address, int capacity) {
return address == NULL ? null : new Buffer(address, capacity);
}

Expand Down
Loading

0 comments on commit 2607557

Please sign in to comment.