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