<commit_before>package webmattr.router;

import webmattr.Func;
import webmattr.Reflection;

import javax.inject.Inject;
import javax.inject.Provider;
import java.util.ArrayList;
import java.util.List;

/**
 * Proxy to an actual RouteComponent and Route configuration object.
 */
public class RouteProxy<T> {
    // Inject history.
    @Inject
    History history;
    // Inject Args Provider.
    @Inject
    Provider<T> argsProvider;

    // Path of this proxy.
    private String path;
    // Is it an "index" or "/" route of it's parent?
    private boolean index;
    // Parent RouteProxy.
    private RouteProxy parent;

    private String memoizedParentPath;

    /**
     *
     */
    public RouteProxy() {
    }

    /**
     * @param path
     */
    public RouteProxy(String path) {
        this.path = path;
    }

    /**
     * @param parent
     */
    public RouteProxy(RouteProxy parent) {
        this.parent = parent;
    }

    /**
     * @param path
     * @param parent
     */
    public RouteProxy(String path, RouteProxy parent) {
        this.path = path;
        this.parent = parent;
    }

    /**
     * @param path
     * @param index
     */
    public RouteProxy(String path, boolean index) {
        this.path = path;
        this.index = index;
    }

    /**
     * @param path
     * @param parent
     * @param index
     */
    public RouteProxy(String path, RouteProxy parent, boolean index) {
        this.path = path;
        this.parent = parent;
        this.index = index;
    }

    /**
     * @return
     */
    protected String path() {
        return path;
    }

    /**
     * @return
     */
    protected RouteProxy parent() {
        return parent;
    }

    /**
     * @return
     */
    public boolean isIndex() {
        return index;
    }

    /**
     * @param nextState
     * @param replaceState
     */
    protected boolean onEnter(RouteProps nextState, ReplaceStateFunction replaceState) {
        final T args = argsProvider.get();
        Reflection.assign(args, nextState.getParams());
        return onEnter(args, nextState, replaceState);<commit_msg>change path() method on RouteProxy from protected to public<commit_after>package webmattr.router;

import webmattr.Func;
import webmattr.Reflection;

import javax.inject.Inject;
import javax.inject.Provider;
import java.util.ArrayList;
import java.util.List;

/**
 * Proxy to an actual RouteComponent and Route configuration object.
 */
public class RouteProxy<T> {
    // Inject history.
    @Inject
    History history;
    // Inject Args Provider.
    @Inject
    Provider<T> argsProvider;

    // Path of this proxy.
    private String path;
    // Is it an "index" or "/" route of it's parent?
    private boolean index;
    // Parent RouteProxy.
    private RouteProxy parent;

    private String memoizedParentPath;

    /**
     *
     */
    public RouteProxy() {
    }

    /**
     * @param path
     */
    public RouteProxy(String path) {
        this.path = path;
    }

    /**
     * @param parent
     */
    public RouteProxy(RouteProxy parent) {
        this.parent = parent;
    }

    /**
     * @param path
     * @param parent
     */
    public RouteProxy(String path, RouteProxy parent) {
        this.path = path;
        this.parent = parent;
    }

    /**
     * @param path
     * @param index
     */
    public RouteProxy(String path, boolean index) {
        this.path = path;
        this.index = index;
    }

    /**
     * @param path
     * @param parent
     * @param index
     */
    public RouteProxy(String path, RouteProxy parent, boolean index) {
        this.path = path;
        this.parent = parent;
        this.index = index;
    }

    /**
     * @return
     */
    public String path() {
        return path;
    }

    /**
     * @return
     */
    protected RouteProxy parent() {
        return parent;
    }

    /**
     * @return
     */
    public boolean isIndex() {
        return index;
    }

    /**
     * @param nextState
     * @param replaceState
     */
    protected boolean onEnter(RouteProps nextState, ReplaceStateFunction replaceState) {
        final T args = argsProvider.get();
        Reflection.assign(args, nextState.getParams());
        return onEnter(args, nextState, replaceState);
{'fraction_non_alphanumeric': 0.10911634413616228, 'fraction_numerical': 0.0, 'mean_word_length': 1.9323308270676691, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5316436', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1226, 'n_words': 333}