001package org.kohsuke.stapler;
002
003/**
004 * {@link Function#contextualize(Object)} parameter that indicates
005 * the function is called to traverse an object graph.
006 *
007 * @author Kohsuke Kawaguchi
008 * @see WebMethod
009 */
010public final class TraversalMethodContext {
011    private final String name;
012
013    // instantiation restricted to this class
014    /*package*/ TraversalMethodContext(String name) {
015        this.name = name;
016    }
017
018    /**
019     * Name of the web method. "" for index route.
020     */
021    public String getName() {
022        return name;
023    }
024
025    /**
026     * Used as a special name that represents {@code getDynamic(...)} that does dynamic traversal.
027     */
028    public static final String DYNAMIC = "\u0000";
029}