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

io.deephaven.lang.api.IsScope Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
/**
 * Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
 */
package io.deephaven.lang.api;

import io.deephaven.lang.generated.*;

import java.util.ArrayList;
import java.util.List;

/**
 * A common interface for {@link ChunkerIdent}, {@link ChunkerInvoke}, {@link ChunkerNew} and {@link ChunkerArray} which
 * are the only ast nodes that can be "scope objects": thing.field.callMethod()[0].moreMethod.new
 * SomeClass().why.would().you.new Ever()
 */
public interface IsScope extends Node {

    String getName();

    void setScopeTarget(Node target);

    Node getScopeTarget();

    List getScope();

    default List asScopeList() {
        List scopes = new ArrayList<>();
        scopes.addAll(getScope());
        scopes.add(this);
        return scopes;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy