- public <T extends BaseEntity> List<T > LoadPositionCache(Class<T> clazz,final String fileLocation,String regionName)
- {
- ...
- }
复制代码
调用时是这么调用的:
LoadPositionCache(RichFirmLadderEntity.class ,"........","........");
RichFirmLadderEntity 是BaseEntity的子类。
在Eclipse编译时没错,但是在continuum中build的时候,报了这个错:
required: Class<T>,String,String
[javac] found: Class<RichFirmLadderEntity>,String,String
[javac] reason: inferred type does not conform to declared bound(s)
[javac] inferred: RichFirmLadderEntity
[javac] bound(s): BaseEntity
[javac] where T is a type-variable:
[javac] T extends BaseEntity declared in method <T>LoadPositionCache(Class<T>,String,String)
想问下各位为什么? |