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

org.remapper.dto.InternalNode Maven / Gradle / Ivy

package org.remapper.dto;

import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;

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

public class InternalNode extends DeclarationNodeTree {

    private List descendants;

    public InternalNode(CompilationUnit cu, String filePath, ASTNode node) {
        super(cu, filePath, node);
        super.setRoot(false);
        super.setLeaf(false);
    }

    public void addDescendants(List nodes) {
        descendants = new ArrayList<>();
        descendants.addAll(nodes);
    }

    public List getDescendants() {
        if (descendants == null) {
            descendants = getChildren();
            return descendants;
        }
        return descendants;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy