Package java.util

Examples of java.util.List.listIterator()


                String[] patterns = this.patterns != null ? this.patterns.split(PATTERN_DELIMITER) : new String[0];
                final List paths = ResourceUtils.getDirectoryContents(
                        url,
                        true,
                        patterns);
                for (final ListIterator iterator = paths.listIterator(); iterator.hasNext();)
                {
                    final URL resource = ResourceUtils.toURL((String)iterator.next());
                    if (resource != null)
                    {
                        iterator.set(resource);
View Full Code Here


        throws Exception
    {
        if (projects.isEmpty())
        {
            final List poms = this.getPoms();
            for (ListIterator iterator = poms.listIterator(); iterator.hasNext();)
            {
                final File pom = (File)iterator.next();
                try
                {
                    // - first attempt to get the existing project from the session
View Full Code Here

    private Set collectProjects()
        throws MojoExecutionException
    {
        final Set projects = new LinkedHashSet();
        final List poms = this.getPoms();
        for (ListIterator iterator = poms.listIterator(); iterator.hasNext();)
        {
            final File pom = (File)iterator.next();
            final MavenProject project = this.getProject(pom);
            if (project != null)
            {
View Full Code Here

    {
        final List files = new ArrayList();
        this.loadFiles(
            directory,
            files);
        for (final ListIterator iterator = files.listIterator(); iterator.hasNext();)
        {
            final File file = (File)iterator.next();
            final String filePath = file.toString().replace(
                    '\\',
                    '/');
View Full Code Here

            allArtifacts.clear();
            allArtifacts.addAll(result.getArtifacts());
        }

        final List allArtifactPaths = new ArrayList(allArtifacts);
        for (final ListIterator iterator = allArtifactPaths.listIterator(); iterator.hasNext();)
        {
            final Artifact artifact = (Artifact)iterator.next();
            if (classpathArtifactTypes.contains(artifact.getType()))
            {
                final File artifactFile = artifact.getFile();
View Full Code Here

              Value lock2 = lock2EqVal.getValue();
              Integer lock2Num = lockToLockNum.get(lock2);

                List afterTn2 = new ArrayList();
              afterTn2.addAll( lockOrder.getSuccsOf(lock2Num) ); // filter here!
              ListIterator lit = afterTn2.listIterator();
              while(lit.hasNext())
              {
                Integer to = (Integer) lit.next(); // node the edges go to
                List labels = lockOrder.getLabelsForEdges(lock2Num, to);
                boolean keep = false;
View Full Code Here

    List imports = _unit.imports();
    if (imports.size() == 0) {
      return null;
    }
    ArrayList importDecl = new ArrayList();
    ListIterator iter = imports.listIterator();
    while (iter.hasNext()) {
      ImportDeclaration decl = (ImportDeclaration) iter.next();
      importDecl.add(decl.getName().toString());
    }
    return importDecl;
View Full Code Here

    List comments = _unit.getCommentList();
    if (comments.size() == 0) {
      return null;
    }
    ArrayList javaDocComments = new ArrayList();
    ListIterator iterator = comments.listIterator();
    while (iterator.hasNext()) {
      Object object = iterator.next();
      if (object instanceof Javadoc) {
        String comment = ((Javadoc) object).getComment();
        // ((Javadoc)object).isDocComment();
View Full Code Here

    return javaDocComments;
  }

  public JClass getDeclaredClass() {
    List types = _unit.types();
    ListIterator typeIter = types.listIterator(0);
    if (typeIter.hasNext()) {
      TypeDeclaration object = (TypeDeclaration) typeIter.next();
      _class = new JClass();
      setClassInformation(_class, object);
      return _class;
View Full Code Here

      cls.setSuperClass(_superClass.getName().getFullyQualifiedName());
    }

    List interfaceLst = object.superInterfaceTypes();

    ListIterator interfaces = interfaceLst.listIterator();
    while (interfaces.hasNext()) {
      {
        SimpleType sin = (SimpleType) interfaces.next();
        cls.getInterfaces().add(sin.toString());
      }
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.