This commit is contained in:
@@ -135,10 +135,6 @@ public abstract class ConvertFactory<R extends Reader, W extends Writer> {
|
||||
|
||||
public abstract ConvertFactory createChild(boolean tiny);
|
||||
|
||||
public boolean isIndexSort() { //是否使用@ConvertColumn.index排序
|
||||
return false;
|
||||
}
|
||||
|
||||
public Convert getConvert() {
|
||||
return convert;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public final class ObjectDecoder<R extends Reader, T> implements Decodeable<R, T
|
||||
if (ref != null && ref.ignore()) continue;
|
||||
Type t = TypeToken.createClassType(field.getGenericType(), this.type);
|
||||
DeMember member = new DeMember(ObjectEncoder.createAttribute(factory, clazz, field, null, null), factory.loadDecoder(t));
|
||||
if (factory.isIndexSort() && ref != null) member.index = ref.getIndex();
|
||||
if (ref != null) member.index = ref.getIndex();
|
||||
list.add(member);
|
||||
}
|
||||
final boolean reversible = factory.isReversible();
|
||||
@@ -104,7 +104,7 @@ public final class ObjectDecoder<R extends Reader, T> implements Decodeable<R, T
|
||||
if (ref != null && ref.ignore()) continue;
|
||||
Type t = TypeToken.createClassType(method.getGenericParameterTypes()[0], this.type);
|
||||
DeMember member = new DeMember(ObjectEncoder.createAttribute(factory, clazz, null, null, method), factory.loadDecoder(t));
|
||||
if (factory.isIndexSort() && ref != null) member.index = ref.getIndex();
|
||||
if (ref != null) member.index = ref.getIndex();
|
||||
list.add(member);
|
||||
}
|
||||
if (cps != null) { //可能存在某些构造函数中的字段名不存在setter方法
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class ObjectEncoder<W extends Writer, T> implements Encodeable<W, T
|
||||
if (ref != null && ref.ignore()) continue;
|
||||
Type t = TypeToken.createClassType(field.getGenericType(), this.type);
|
||||
EnMember member = new EnMember(createAttribute(factory, clazz, field, null, null), factory.loadEncoder(t));
|
||||
if (factory.isIndexSort() && ref != null) member.index = ref.getIndex();
|
||||
if (ref != null) member.index = ref.getIndex();
|
||||
list.add(member);
|
||||
}
|
||||
for (final Method method : clazz.getMethods()) {
|
||||
@@ -95,7 +95,7 @@ public final class ObjectEncoder<W extends Writer, T> implements Encodeable<W, T
|
||||
if (ref != null && ref.ignore()) continue;
|
||||
Type t = TypeToken.createClassType(method.getGenericReturnType(), this.type);
|
||||
EnMember member = new EnMember(createAttribute(factory, clazz, null, method, null), factory.loadEncoder(t));
|
||||
if (factory.isIndexSort() && ref != null) member.index = ref.getIndex();
|
||||
if (ref != null) member.index = ref.getIndex();
|
||||
list.add(member);
|
||||
}
|
||||
this.members = list.toArray(new EnMember[list.size()]);
|
||||
|
||||
Reference in New Issue
Block a user