use of org.eclipse.n4js.n4JS.ExportableElement in project n4js by eclipse.
the class FunctionDeclarationImpl method getExportedName.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getExportedName() {
boolean _isExported = this.isExported();
if (_isExported) {
EObject _eContainer = this.eContainer();
final ExportDeclaration exportDecl = ((ExportDeclaration) _eContainer);
boolean _isDefaultExport = exportDecl.isDefaultExport();
if (_isDefaultExport) {
return "default";
}
final ExportableElement me = this;
String _switchResult = null;
boolean _matched = false;
if (me instanceof NamedElement) {
_matched = true;
_switchResult = ((NamedElement) me).getName();
}
if (!_matched) {
if (me instanceof IdentifiableElement) {
_matched = true;
_switchResult = ((IdentifiableElement) me).getName();
}
}
return _switchResult;
}
return null;
}
use of org.eclipse.n4js.n4JS.ExportableElement in project n4js by eclipse.
the class ExportedVariableStatementImpl method getExportedName.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getExportedName() {
boolean _isExported = this.isExported();
if (_isExported) {
EObject _eContainer = this.eContainer();
final ExportDeclaration exportDecl = ((ExportDeclaration) _eContainer);
boolean _isDefaultExport = exportDecl.isDefaultExport();
if (_isDefaultExport) {
return "default";
}
final ExportableElement me = this;
String _switchResult = null;
boolean _matched = false;
if (me instanceof NamedElement) {
_matched = true;
_switchResult = ((NamedElement) me).getName();
}
if (!_matched) {
if (me instanceof IdentifiableElement) {
_matched = true;
_switchResult = ((IdentifiableElement) me).getName();
}
}
return _switchResult;
}
return null;
}
use of org.eclipse.n4js.n4JS.ExportableElement in project n4js by eclipse.
the class AnnotationListImpl method getExportedName.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getExportedName() {
boolean _isExported = this.isExported();
if (_isExported) {
EObject _eContainer = this.eContainer();
final ExportDeclaration exportDecl = ((ExportDeclaration) _eContainer);
boolean _isDefaultExport = exportDecl.isDefaultExport();
if (_isDefaultExport) {
return "default";
}
final ExportableElement me = this;
String _switchResult = null;
boolean _matched = false;
if (me instanceof NamedElement) {
_matched = true;
_switchResult = ((NamedElement) me).getName();
}
if (!_matched) {
if (me instanceof IdentifiableElement) {
_matched = true;
_switchResult = ((IdentifiableElement) me).getName();
}
}
return _switchResult;
}
return null;
}
use of org.eclipse.n4js.n4JS.ExportableElement in project n4js by eclipse.
the class ExportableElementImpl method getExportedName.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getExportedName() {
boolean _isExported = this.isExported();
if (_isExported) {
EObject _eContainer = this.eContainer();
final ExportDeclaration exportDecl = ((ExportDeclaration) _eContainer);
boolean _isDefaultExport = exportDecl.isDefaultExport();
if (_isDefaultExport) {
return "default";
}
final ExportableElement me = this;
String _switchResult = null;
boolean _matched = false;
if (me instanceof NamedElement) {
_matched = true;
_switchResult = ((NamedElement) me).getName();
}
if (!_matched) {
if (me instanceof IdentifiableElement) {
_matched = true;
_switchResult = ((IdentifiableElement) me).getName();
}
}
return _switchResult;
}
return null;
}
use of org.eclipse.n4js.n4JS.ExportableElement in project n4js by eclipse.
the class ScriptFactory method getScriptElementAt.
private static ScriptElement getScriptElementAt(Script script, int i) {
EList<ScriptElement> scriptElems = script.getScriptElements();
ScriptElement scriptElement = scriptElems.get(i);
if (scriptElement instanceof ExportDeclaration) {
ExportableElement expElem = ((ExportDeclaration) scriptElement).getExportedElement();
if (expElem instanceof ExportedVariableStatement) {
scriptElement = (ExportedVariableStatement) expElem;
}
}
return scriptElement;
}
Aggregations