This commit is contained in:
redkale
2023-03-30 18:29:12 +08:00
parent c9c202f63f
commit 41e1ffa6e2
4 changed files with 11 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ package org.redkale.annotation;
import java.lang.annotation.*;
/**
* 标记值可以为null
*
* 详情见: https://redkale.org
*

View File

@@ -6,6 +6,7 @@ package org.redkale.annotation;
import java.lang.annotation.*;
/**
* 标记值可以为null
*
* 详情见: https://redkale.org
*

View File

@@ -7,6 +7,7 @@ package org.redkale.net.client;
import java.util.Objects;
import java.util.concurrent.*;
import org.redkale.annotation.Nonnull;
import org.redkale.net.*;
/**
@@ -20,8 +21,10 @@ import org.redkale.net.*;
*/
public class ClientFuture<R extends ClientRequest, T> extends CompletableFuture<T> implements Runnable {
@Nonnull
protected final R request;
@Nonnull
protected final ClientConnection conn;
private ScheduledFuture timeout;

View File

@@ -8,6 +8,7 @@ package org.redkale.util;
import java.lang.reflect.TypeVariable;
import java.util.*;
import java.util.function.*;
import org.redkale.annotation.*;
import static org.redkale.asm.ClassWriter.COMPUTE_FRAMES;
import org.redkale.asm.*;
import static org.redkale.asm.Opcodes.*;
@@ -98,6 +99,7 @@ public interface Attribute<T, F> {
*
* @return 字段的数据类型
*/
@Nonnull
public Class<? extends F> type();
/**
@@ -105,6 +107,7 @@ public interface Attribute<T, F> {
*
* @return 字段的数据泛型
*/
@Nonnull
default java.lang.reflect.Type genericType() {
return type();
}
@@ -114,6 +117,7 @@ public interface Attribute<T, F> {
*
* @return 依附的类名
*/
@Nonnull
public Class<T> declaringClass();
/**
@@ -121,6 +125,7 @@ public interface Attribute<T, F> {
*
* @return 字段名
*/
@Nonnull
public String field();
/**
@@ -147,6 +152,7 @@ public interface Attribute<T, F> {
*
* @return 附加对象
*/
@Nullable
default <E> E attach() {
return null;
}