public CodeBuilder superClass(Class<?> clazz) {
        if (clazz.isInterface()) {
            System.out.println(clazz + "为接口对象！取消设为继承类。");
            return this;
        }

        String simpleName = clazz.getSimpleName();
        Package pkg = clazz.getPackage();
        imports.add(pkg.getName() + "." + simpleName);// 导入包
        this.superClass = simpleName;// 设置继承的类名
        return this;
    }
public CodeBuilder superClass(Class<?> clazz) {
        if (clazz.isInterface()) {
            System.out.println(clazz + "为接口对象！取消设为继承类。");
            return this;
        }

        String simpleName = clazz.getSimpleName();
        Package pkg = clazz.getPackage();
        imports.add(pkg.getName() + "." + simpleName);
        this.superClass = simpleName;
        return this;
    }
public CodeBuilder superClass ( Class < ? > clazz ) { if ( clazz . isInterface ( ) ) { System . out . println ( clazz + "为接口对象！取消设为继承类。"); return this ; } String simpleName = clazz . getSimpleName ( ) ; Package pkg = clazz . getPackage ( ) ; imports . add ( pkg . getName ( ) + "." + simpleName ) ; // 导入包 this . superClass = simpleName ; // 设置继承的类名 return this ; }
设置继承类

@author 瑛琪 <a href="http://xiongyingqi.com">xiongyingqi.com</a>
@version 2014/3/20 0020 19:57
设置继承类