Package jdolly.visitors

Examples of jdolly.visitors.ImportCheckerVisitor


        Name packageToCompare = cu2.getPackage().getName();
        ImportDeclaration importDeclaration = null;
        if (packageName.getFullyQualifiedName().equals(
            packageToCompare.getFullyQualifiedName()))
          continue;
        ImportCheckerVisitor iv = new ImportCheckerVisitor();
        cu2.accept(iv);

        // adiciona o import para super class
        if (iv.getClassName().equals(cv.getSuperClassName())) {
          importDeclaration = importPacakge(packageToCompare);

        }
        // adiciona o import para fields
        else {
          for (String fieldType : cv.getFieldTypes()) {
            if (iv.getClassName().equals(fieldType)) {
              importDeclaration = importPacakge(packageToCompare);
              break;
            }
          }
          if (importDeclaration == null) {
            for (String instanceType : cv.getInstanceTypes()) {
              if (iv.getClassName().equals(instanceType)) {
                importDeclaration = importPacakge(packageToCompare);
                break;
              }
            }
          }
View Full Code Here

TOP

Related Classes of jdolly.visitors.ImportCheckerVisitor

Copyright © 2018 www.massapicom. 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.