
pro.jk.ejoker.common.utils.genericity.GenericExpressionExportTuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ejoker-common Show documentation
Show all versions of ejoker-common Show documentation
EJoker is a CQRS + EventSourcing framwork
package pro.jk.ejoker.common.utils.genericity;
/**
* 用于记录泛型声明在具现化表达时,从下级继承类或扩展类的具现化向上传递的关系。
* 例如
* 有一接口 定义为 IService<T>
* 在某一地点有声明一实例
*
class ServiceA implements IService<Integer> {
*
//...
*
}
*
*
那么构建GenericExpression时,将会构建一个GenericExpressionExportTuple
*
其中 GenericDeclaration 描述的是 泛型变量T的位置和名字
*
GenericDefinedType 描述的是声明的IService<Integer>中的Integer部分相关的信息
*
* @author kimffy
*
*/
public class GenericExpressionExportTuple {
private final GenericDeclaration refDeclare;
public final GenericDefinedType declarationTypeMeta;
public GenericExpressionExportTuple(GenericDeclaration refDeclare, GenericDefinedType declarationType) {
super();
this.refDeclare = refDeclare;
this.declarationTypeMeta = declarationType;
}
public int getIndex() {
return refDeclare.index;
}
public String getName() {
return refDeclare.name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy