/*
Runs the given visitor on this log.

(non-Javadoc)
@see org.deckfour.xes.model.XLog#accept(org.deckfour.xes.model.XVisitor)
347272
public boolean accept(XVisitor visitor) {
		/*
		 * Check whether the visitor may run.
		 */
		if (visitor.precondition()) {
			/*
			 * Yes, it may. Now initialize.
			 */
			visitor.init(this);
			/*
			 * First call.
			 */
			visitor.visitLogPre(this);
			/*
			 * Visit the extensions.
			 */
			for (XExtension extension: extensions) {
				extension.accept(visitor, this);
			}
			/*
			 * Visit the classifiers.
			 */
			for (XEventClassifier classifier: classifiers) {
				classifier.accept(visitor, this);
			}
			/*
			 * Visit the attributes.
			 */
			for (XAttribute attribute: attributes.values()) {
				attribute.accept(visitor, this);
			}
			/*
			 * Visit the traces.
			 */
			for (XTrace trace: this) {
				trace.accept(visitor, this);
			}
			/*
			 * Last call.
			 */
			visitor.visitLogPost(this);
			return true;
		}
		return false;
	}
1348330
public synchronized void accept(CacheVisitor<K,V> visitor) {
        expungeExpiredEntries();
        Map<K,V> cached = getCachedEntries();

        visitor.visit(cached);
    }
44683
@Override
  public void accept(final FastFuture<T> t) {
    if (count++ % sampleRate == 0)
      consumer.accept(t);

  }
292667
@Override
	public void accept(Visitor<OptimizerNode> visitor) {
		if (visitor.preVisit(this)) {
			if (this.input1 == null || this.input2 == null) {
				throw new CompilerException();
			}
			
			getFirstPredecessorNode().accept(visitor);
			getSecondPredecessorNode().accept(visitor);
			
			for (DagConnection connection : getBroadcastConnections()) {
				connection.getSource().accept(visitor);
			}
			
			visitor.postVisit(this);
		}
	}
858036
@Override
    public boolean accept(File file) {
        return WatcherUtils.isInDirectory(file, WatcherUtils.getJavaSource(basedir));
    }
754011
public void accept(final WebAppVisitor visitor) {
		visitor.visit(this); // First do everything else

		for (WebAppListener listener : listeners) {
			visitor.visit(listener);
		}
		if (!filters.isEmpty()) {
			// first visit the filters with a filter mapping in mapping order
			final List<WebAppFilter> remainingFilters = new ArrayList<>(
					filters.values());
			for (String filterName : orderedFilters) {
				final WebAppFilter filter = filters.get(filterName);
				visitor.visit(filter);
				remainingFilters.remove(filter);
			}
			// then visit filters without a mapping order in the order they were
			// added
			for (WebAppFilter filter : remainingFilters) {
				visitor.visit(filter);
			}
		}
		if (!servlets.isEmpty()) {
			for (WebAppServlet servlet : getSortedWebAppServlet()) {
				// Fix for PAXWEB-205
				visitor.visit(servlet);
			}
		}
		if (!constraintsMapping.isEmpty()) {
			for (WebAppConstraintMapping constraintMapping : constraintsMapping) {
				visitor.visit(constraintMapping);
			}

		}

		for (WebAppErrorPage errorPage : errorPages) {
			visitor.visit(errorPage);
		}

		visitor.end();
	}
998658
@Override
    public boolean accept(File pathname) {
        boolean accept = super.accept(pathname);
        if (accept) {
            try {
                accept &= shouldProcess(pathname);
            } catch (AnalysisException ex) {
                throw new UnexpectedAnalysisException(ex.getMessage(), ex.getCause());
            }
        }
        return accept;
    }
45363
public final void visit(final Visitor visitor)
	{
		final Visit visit = new Visit();
		try
		{
			visit(visitor, visit);
		}
		catch (final StopVisitationException ignored)
		{
		}
	}
69101
public boolean accept(Class<?> aClass) {
        try {
            return (testKryo.getRegistration(aClass) != null);
        } catch (IllegalArgumentException e) {
            return false;
        }
    }
200211
public boolean accept(File file) {
        if( !WatcherUtils.isInDirectory(file, javaSourceDir) || !WatcherUtils.hasExtension(file,"java")){
            return false;
        }

        // If the file has been deleted by may have been a controller, return true.
        // The cleanup will be applied.
        if (! file.isFile()) {
            return true;
        }

        //Parse the Java File and check if it's a wisdom Controller
        try {
            final CompilationUnit parse = JavaParser.parse(file);
            // The visitor return a Boolean object, potentially null.
            final Boolean accept = parse.accept(CLASS_VISITOR, null);
            return accept != null  && accept;
        } catch (Exception e) {
            getLog().error("Cannot parse  " + file.getAbsolutePath(), e);
            return false;
        }
    }
1128675
@Override
    public void accept(E1 first, E2 second, E3 third) {
        for (TriConsumer<E1, E2, E3> consumer : consumers) {
            consumer.accept(first, second, third);
        }
    }
196431
public void accept() throws NotConnectedException, InterruptedException {
        Stanza acceptPacket = new AcceptPacket(this.session.getWorkgroupJID());
        connection.sendStanza(acceptPacket);
        // TODO: listen for a reply.
        accepted = true;
    }
433015
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final String[] data = issue.getData();
		if (data != null && data.length > 0) {
			final String expectedType = data[0];
			final ReturnTypeAddModification modification = new ReturnTypeAddModification(expectedType);
			modification.setIssue(issue);
			modification.setTools(provider);
			acceptor.accept(issue,
					MessageFormat.format(Messages.SARLQuickfixProvider_13, expectedType),
					Messages.SARLQuickfixProvider_14,
					JavaPluginImages.IMG_CORRECTION_ADD,
					modification,
					IProposalRelevance.CHANGE_RETURN_TYPE);
		}
	}
1261399
protected <R, C> R accept(AstVisitor<R, C> visitor, C context)
    {
        return visitor.visitNode(this, context);
    }
987250
public <R, P> R accept(TypeVisitor<R, P> v, P p) {
		return null;
	}
357494
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final BehaviorUnitGuardRemoveModification modification = new BehaviorUnitGuardRemoveModification();
		modification.setIssue(issue);
		modification.setTools(provider);
		acceptor.accept(issue,
				Messages.SARLQuickfixProvider_0,
				Messages.SARLQuickfixProvider_4,
				JavaPluginImages.IMG_CORRECTION_REMOVE,
				modification,
				IProposalRelevance.REMOVE_METHOD_BODY);
	}
25331
@Override
    public boolean accept(File pathname) {

        boolean accepted = super.accept(pathname);
        if (accepted) {
            final File parentDir = pathname.getParentFile();
            accepted = parentDir != null && parentDir.getName().equals(SPECIFICATIONS);
        }

        return accepted;
    }