mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-01-07 04:39:04 +00:00
Add @Nullable and @NonNull annotations
This commit is contained in:
@@ -14,6 +14,7 @@ import dan200.computercraft.core.filesystem.FileSystemException;
|
||||
import dan200.computercraft.core.filesystem.IMountedFileBinary;
|
||||
import dan200.computercraft.core.filesystem.IMountedFileNormal;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -54,6 +55,7 @@ public class FSAPI implements ILuaAPI
|
||||
m_fileSystem = null;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String[] getMethodNames()
|
||||
{
|
||||
@@ -78,7 +80,7 @@ public class FSAPI implements ILuaAPI
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] callMethod( ILuaContext context, int method, Object[] args ) throws LuaException
|
||||
public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull Object[] args ) throws LuaException
|
||||
{
|
||||
switch( method )
|
||||
{
|
||||
@@ -370,6 +372,7 @@ public class FSAPI implements ILuaAPI
|
||||
private static Object[] wrapBufferedReader( final IMountedFileNormal reader )
|
||||
{
|
||||
return new Object[] { new ILuaObject() {
|
||||
@Nonnull
|
||||
@Override
|
||||
public String[] getMethodNames()
|
||||
{
|
||||
@@ -381,7 +384,7 @@ public class FSAPI implements ILuaAPI
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] callMethod( ILuaContext context, int method, Object[] args ) throws LuaException
|
||||
public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull Object[] args ) throws LuaException
|
||||
{
|
||||
switch( method )
|
||||
{
|
||||
@@ -439,6 +442,7 @@ public class FSAPI implements ILuaAPI
|
||||
private static Object[] wrapBufferedWriter( final IMountedFileNormal writer )
|
||||
{
|
||||
return new Object[] { new ILuaObject() {
|
||||
@Nonnull
|
||||
@Override
|
||||
public String[] getMethodNames()
|
||||
{
|
||||
@@ -451,7 +455,7 @@ public class FSAPI implements ILuaAPI
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] callMethod( ILuaContext context, int method, Object[] args ) throws LuaException
|
||||
public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull Object[] args ) throws LuaException
|
||||
{
|
||||
switch( method )
|
||||
{
|
||||
@@ -521,6 +525,7 @@ public class FSAPI implements ILuaAPI
|
||||
|
||||
return new Object[] { new ILuaObject() {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String[] getMethodNames() {
|
||||
return new String[] {
|
||||
@@ -530,7 +535,7 @@ public class FSAPI implements ILuaAPI
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] callMethod( ILuaContext context, int method, Object[] args) throws LuaException {
|
||||
public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull Object[] args) throws LuaException {
|
||||
switch( method )
|
||||
{
|
||||
case 0:
|
||||
@@ -572,6 +577,7 @@ public class FSAPI implements ILuaAPI
|
||||
|
||||
return new Object[] { new ILuaObject() {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String[] getMethodNames() {
|
||||
return new String[] {
|
||||
@@ -582,7 +588,7 @@ public class FSAPI implements ILuaAPI
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] callMethod( ILuaContext context, int method, Object[] args) throws LuaException {
|
||||
public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull Object[] args) throws LuaException {
|
||||
switch( method )
|
||||
{
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user