001/*
002 * Copyright (c) 2012-2018 Institut National des Sciences Appliquées de Lyon (INSA Lyon) and others
003 *
004 * This program and the accompanying materials are made available under the
005 * terms of the Eclipse Public License 2.0 which is available at
006 * http://www.eclipse.org/legal/epl-2.0.
007 *
008 * SPDX-License-Identifier: EPL-2.0
009 */
010
011package org.eclipse.golo.compiler.parser;
012
013import java.util.List;
014import java.util.Collections;
015
016public class ASTImportDeclaration extends GoloASTNode implements NamedNode {
017
018  private String name;
019  private boolean relative;
020  private List<String> multi = Collections.emptyList();
021
022  public ASTImportDeclaration(int i) {
023    super(i);
024  }
025
026  public ASTImportDeclaration(GoloParser p, int i) {
027    super(p, i);
028  }
029
030  @Override
031  public String getName() {
032    return name;
033  }
034
035  @Override
036  public void setName(String name) {
037    this.name = name;
038  }
039
040  public void setRelative(boolean b) {
041    this.relative = b;
042  }
043
044  public boolean isRelative() {
045    return this.relative;
046  }
047
048  public List<String> getMultiple() {
049    return multi;
050  }
051
052  public void setMultiple(List<String> names) {
053    multi = names;
054  }
055
056  @Override
057  public String toString() {
058    return String.format("ASTImportDeclaration{name='%s'}", name);
059  }
060
061  @Override
062  public Object jjtAccept(GoloParserVisitor visitor, Object data) {
063    return visitor.visit(this, data);
064  }
065}