com.hframework.beans.class0.ClassDescData Maven / Gradle / Ivy
package com.hframework.beans.class0;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* class的数据对象
* @author zhangqh6
*
*/
public class ClassDescData {
//引用类列表
List importClassList = new ArrayList();
//成员变量列表-单个类型成员变量
List> sigleVarList = new ArrayList>();
//成员变量列表-集合类型成员变量
List> multiVarList = new ArrayList>();
//构造方法类表
List>> constrauctorListList = new ArrayList>>();
/**
* 添加引入类
* @param importClass
*/
public void addImportClass(String importClass){
importClassList.add(importClass);
}
/**
* 添加成员变量-单个
* @param varInfo
*/
public void addSigleVar(String[] varInfo){
sigleVarList.add(Arrays.asList(varInfo));
}
/**
* 添加成员变量-单个
* @param varInfo
*/
public void addSigleVar(List varInfo){
sigleVarList.add(varInfo);
}
/**
* 添加成员变量-列表
* @param varInfo
*/
public void addMultiVar(String[] varInfo){
multiVarList.add(Arrays.asList(varInfo));
}
/**
* 添加成员变量-列表
* @param varInfo
*/
public void addMultiVar(List varInfo){
multiVarList.add(varInfo);
}
/**
* 获得一个构造器
* @return
*/
public Constrauctor getConstrauctor(){
Constrauctor constrauctor = new Constrauctor();
constrauctorListList.add(constrauctor.getConstrauctorList());
return constrauctor;
}
class Constrauctor{
List> constrauctorList = new ArrayList>();
public List> getConstrauctorList() {
return constrauctorList;
}
public void addInVar(String[] varInfo){
constrauctorList.add(Arrays.asList(varInfo));
}
public void addInVar(List varInfo){
constrauctorList.add(varInfo);
}
public void addCodeLine(String[] code){
constrauctorList.add(Arrays.asList(code));
}
public void addCodeLine(List code){
constrauctorList.add(code);
}
}
}