All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.yolean.trace.TraceVisitor Maven / Gradle / Ivy

Go to download

Library for use in Java components of Vespa. Shared code which do not fit anywhere else.

There is a newer version: 8.409.18
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.yolean.trace;

/**
 * 

This class is an abstract visitor of {@link TraceNode}. See {@link TraceNode#accept(TraceVisitor)}.

* * @author bratseth * @since 5.1.15 */ public abstract class TraceVisitor { /** *

Visits a {@link TraceNode}. Called by {@link TraceNode#accept(TraceVisitor)}, before visiting its * children.

* * @param node the TraceNode being visited * @see TraceNode#accept(TraceVisitor) */ public abstract void visit(TraceNode node); /** *

Enters a {@link TraceNode}. This method is called after {@link #visit(TraceNode)}, but before visiting its * children. Note that this method is NOT called if a TraceNode has zero children.

*

The default implementation of this method does nothing.

* * @param node the TraceNode being entered * @see #leaving(TraceNode) */ @SuppressWarnings("UnusedParameters") public void entering(TraceNode node) { // empty } /** *

Leaves a {@link TraceNode}. This method is called after {@link #entering(TraceNode)}, and after visiting its * children. Note that this method is NOT called if a TraceNode has zero children.

*

The default implementation of this method does nothing.

* * @param node the TraceNode being left */ @SuppressWarnings("UnusedParameters") public void leaving(TraceNode node) { // empty } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy