This commit is contained in:
wentch
2015-12-24 10:45:35 +08:00
parent 14f28d546e
commit aca66df386
2 changed files with 4 additions and 9 deletions

View File

@@ -437,13 +437,8 @@ public class CacheSourceService<K extends Serializable, V extends Object> implem
this.value = value; this.value = value;
} }
private static Creator createCreator() { private static Creator createCreator() { //供 Creator.create 调用
return new Creator<CacheEntry>() { return (Creator<CacheEntry>) (Object... params) -> new CacheEntry((CacheEntryType) params[0], (Integer) params[1], (Integer) params[2], (Serializable) params[3], params[4]);
@Override
public CacheEntry create(Object... params) {
return new CacheEntry((CacheEntryType) params[0], (Integer) params[1], (Integer) params[2], (Serializable) params[3], params[4]);
}
};
} }
@Override @Override

View File

@@ -28,9 +28,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
* } * }
* *
* private static Creator createCreator() { * private static Creator createCreator() {
* return new Creator() { * return new Creator<Record>() {
* @Override * @Override
* public Object create(Object... params) { * public Record create(Object... params) {
* return new Record((Integer) params[0], (String) params[1]); * return new Record((Integer) params[0], (String) params[1]);
* } * }
* }; * };