/* * ****************************************************************************** * MontiCore Language Workbench * Copyright (c) 2015, MontiCore, All rights reserved. * * This project is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this project. If not, see <http://www.gnu.org/licenses/>. * ****************************************************************************** */ /* generated from model null*/ /* generated by template symboltable.SymbolReference*/ package mc.embedding.external.host._symboltable; import de.monticore.symboltable.Scope; import de.monticore.symboltable.MutableScope; import de.monticore.symboltable.modifiers.AccessModifier; import de.monticore.symboltable.references.CommonSymbolReference; import de.monticore.symboltable.references.SymbolReference; import java.util.Collection; /** * Represents a reference of {@link HostSymbol}. */ public class HostSymbolReference extends HostSymbol implements SymbolReference<HostSymbol> { protected final SymbolReference<HostSymbol> reference; public HostSymbolReference(final String name, final Scope definingScopeOfReference) { super(name); reference = new CommonSymbolReference<>(name, HostSymbol.KIND, definingScopeOfReference); } /* * Methods of SymbolReference interface */ @Override public HostSymbol getReferencedSymbol() { return reference.getReferencedSymbol(); } @Override public boolean existsReferencedSymbol() { return reference.existsReferencedSymbol(); } @Override public boolean isReferencedSymbolLoaded() { return reference.isReferencedSymbolLoaded(); } /* * Methods of Symbol interface */ @Override public String getName() { return getReferencedSymbol().getName(); } @Override public String getFullName() { return getReferencedSymbol().getFullName(); } @Override public void setEnclosingScope(MutableScope scope) { getReferencedSymbol().setEnclosingScope(scope); } @Override public Scope getEnclosingScope() { return getReferencedSymbol().getEnclosingScope(); } @Override public AccessModifier getAccessModifier() { return getReferencedSymbol().getAccessModifier(); } @Override public void setAccessModifier(AccessModifier accessModifier) { getReferencedSymbol().setAccessModifier(accessModifier); } /* * Methods of ScopeSpanningSymbol interface */ //@Override //public Scope getSpannedScope() { // return getReferencedSymbol().getSpannedScope(); //} /* * Methods of HostSymbol class */ @Override public Collection<ContentSymbol> getContent() { return getReferencedSymbol().getContent(); } }