Nonnull
This commit is contained in:
@@ -6,6 +6,7 @@ package org.redkale.annotation;
|
|||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 标记值可以为null
|
||||||
*
|
*
|
||||||
* 详情见: https://redkale.org
|
* 详情见: https://redkale.org
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ package org.redkale.annotation;
|
|||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 标记值可以为null
|
||||||
*
|
*
|
||||||
* 详情见: https://redkale.org
|
* 详情见: https://redkale.org
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ package org.redkale.net.client;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
import org.redkale.annotation.Nonnull;
|
||||||
import org.redkale.net.*;
|
import org.redkale.net.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,8 +21,10 @@ import org.redkale.net.*;
|
|||||||
*/
|
*/
|
||||||
public class ClientFuture<R extends ClientRequest, T> extends CompletableFuture<T> implements Runnable {
|
public class ClientFuture<R extends ClientRequest, T> extends CompletableFuture<T> implements Runnable {
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
protected final R request;
|
protected final R request;
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
protected final ClientConnection conn;
|
protected final ClientConnection conn;
|
||||||
|
|
||||||
private ScheduledFuture timeout;
|
private ScheduledFuture timeout;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package org.redkale.util;
|
|||||||
import java.lang.reflect.TypeVariable;
|
import java.lang.reflect.TypeVariable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
import org.redkale.annotation.*;
|
||||||
import static org.redkale.asm.ClassWriter.COMPUTE_FRAMES;
|
import static org.redkale.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import org.redkale.asm.*;
|
import org.redkale.asm.*;
|
||||||
import static org.redkale.asm.Opcodes.*;
|
import static org.redkale.asm.Opcodes.*;
|
||||||
@@ -98,6 +99,7 @@ public interface Attribute<T, F> {
|
|||||||
*
|
*
|
||||||
* @return 字段的数据类型
|
* @return 字段的数据类型
|
||||||
*/
|
*/
|
||||||
|
@Nonnull
|
||||||
public Class<? extends F> type();
|
public Class<? extends F> type();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,6 +107,7 @@ public interface Attribute<T, F> {
|
|||||||
*
|
*
|
||||||
* @return 字段的数据泛型
|
* @return 字段的数据泛型
|
||||||
*/
|
*/
|
||||||
|
@Nonnull
|
||||||
default java.lang.reflect.Type genericType() {
|
default java.lang.reflect.Type genericType() {
|
||||||
return type();
|
return type();
|
||||||
}
|
}
|
||||||
@@ -114,6 +117,7 @@ public interface Attribute<T, F> {
|
|||||||
*
|
*
|
||||||
* @return 依附的类名
|
* @return 依附的类名
|
||||||
*/
|
*/
|
||||||
|
@Nonnull
|
||||||
public Class<T> declaringClass();
|
public Class<T> declaringClass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,6 +125,7 @@ public interface Attribute<T, F> {
|
|||||||
*
|
*
|
||||||
* @return 字段名
|
* @return 字段名
|
||||||
*/
|
*/
|
||||||
|
@Nonnull
|
||||||
public String field();
|
public String field();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -147,6 +152,7 @@ public interface Attribute<T, F> {
|
|||||||
*
|
*
|
||||||
* @return 附加对象
|
* @return 附加对象
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
default <E> E attach() {
|
default <E> E attach() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user