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;
}
private static Creator createCreator() {
return new Creator<CacheEntry>() {
@Override
public CacheEntry create(Object... params) {
return new CacheEntry((CacheEntryType) params[0], (Integer) params[1], (Integer) params[2], (Serializable) params[3], params[4]);
}
};
private static Creator createCreator() { //供 Creator.create 调用
return (Creator<CacheEntry>) (Object... params) -> new CacheEntry((CacheEntryType) params[0], (Integer) params[1], (Integer) params[2], (Serializable) params[3], params[4]);
}
@Override

View File

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