Examples of buildImports()


Examples of cn.shenyanchao.builder.CompilationUnitBuilder.buildImports()

            ClassTypeBuilder classTypeBuilder = new ClassTypeBuilder(className + Consts.TEST_SUFFIX);
            //process methods
            List<MethodDeclaration> methodDeclarations = MembersFilter.findMethodsFrom(typeDeclaration);
            for (MethodDeclaration methodDeclaration : methodDeclarations) {
                //has method and add import
                compilationUnitBuilder.buildImports(null);

                String methodName = methodDeclaration.getName();
                getLog().info("methodName:" + methodDeclaration.getName());
                classTypeBuilder.buildMethod(methodName + Consts.TEST_SUFFIX, methodDeclaration);
            }
View Full Code Here

Examples of cn.shenyanchao.ut.builder.CompilationUnitBuilder.buildImports()

        String className = typeDeclaration.getName();
        ClassTypeBuilder classTypeBuilder = new ClassTypeBuilder(className + Consts.TEST_SUFFIX);
        compilationUnitBuilder.buildComment(FileComments.GENERATOR_COMMENT);
        compilationUnitBuilder.buildPackage(testPackageName);
        //process import
        compilationUnitBuilder.buildImports(null);
        //process methods
        for (MethodDeclaration methodDeclaration : methodDeclarations) {
            String methodName = methodDeclaration.getName();
            classTypeBuilder.buildMethod(methodName + Consts.TEST_SUFFIX, methodDeclaration);
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.BinaryTypeConverter.buildImports()

        parsedUnit = new CompilationUnitDeclaration(this.parser.problemReporter(), result, 0);
        HashSetOfCharArrayArray typeNames = new HashSetOfCharArrayArray();

        BinaryTypeConverter converter = new BinaryTypeConverter(this.parser.problemReporter(), result, typeNames);
        typeDeclaration = converter.buildTypeDeclaration(context, parsedUnit);
        parsedUnit.imports = converter.buildImports(reader);
      }

      if (typeDeclaration != null) {

        // add fake field with the type we're looking for
View Full Code Here

Examples of org.eclipse.jdt.internal.core.BinaryTypeConverter.buildImports()

        parsedUnit = new CompilationUnitDeclaration(this.parser.problemReporter(), result, 0);
        HashSetOfCharArrayArray typeNames = new HashSetOfCharArrayArray();

        BinaryTypeConverter converter = new BinaryTypeConverter(this.parser.problemReporter(), result, typeNames);
        typeDeclaration = converter.buildTypeDeclaration(context, parsedUnit);
        parsedUnit.imports = converter.buildImports(reader);
      }

      if (typeDeclaration != null) {

        // add fake field with the type we're looking for
View Full Code Here

Examples of org.eclipse.jdt.internal.core.BinaryTypeConverter.buildImports()

        parsedUnit = new CompilationUnitDeclaration(this.parser.problemReporter(), result, 0);
        HashSetOfCharArrayArray typeNames = new HashSetOfCharArrayArray();

        BinaryTypeConverter converter = new BinaryTypeConverter(this.parser.problemReporter(), result, typeNames);
        typeDeclaration = converter.buildTypeDeclaration(context, parsedUnit);
        parsedUnit.imports = converter.buildImports(reader);
      }

      if (typeDeclaration != null) {

        // add fake field with the type we're looking for
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.