use of org.eclipse.n4js.n4JS.FunctionOrFieldAccessor in project n4js by eclipse.
the class MissingReturnOrThrowValidator method internalCheckMissingReturnDisallowed.
private void internalCheckMissingReturnDisallowed(N4JSFlowgraphValidator fVali) {
Collection<FunctionOrFieldAccessor> mrtFunctions = mrta.getMRTFunctions();
for (FunctionOrFieldAccessor fofa : mrtFunctions) {
EStructuralFeature highlightFeature = getMarkedElement(fofa);
String msg = IssueCodes.getMessageForFUN_MISSING_RETURN_OR_THROW_STATEMENT();
fVali.addIssue(msg, fofa, highlightFeature, IssueCodes.FUN_MISSING_RETURN_OR_THROW_STATEMENT);
}
}
use of org.eclipse.n4js.n4JS.FunctionOrFieldAccessor in project n4js by eclipse.
the class N4MethodDeclarationImpl method getDefinedFunctionOrAccessor.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IdentifiableElement getDefinedFunctionOrAccessor() {
final FunctionOrFieldAccessor _this = this;
EObject _switchResult = null;
boolean _matched = false;
if (_this instanceof FunctionDefinition) {
_matched = true;
_switchResult = ((FunctionDefinition) _this).getDefinedType();
}
if (!_matched) {
if (_this instanceof FieldAccessor) {
_matched = true;
_switchResult = ((FieldAccessor) _this).getDefinedAccessor();
}
}
return ((IdentifiableElement) _switchResult);
}
use of org.eclipse.n4js.n4JS.FunctionOrFieldAccessor in project n4js by eclipse.
the class N4FieldAccessorImpl method getDefinedFunctionOrAccessor.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IdentifiableElement getDefinedFunctionOrAccessor() {
final FunctionOrFieldAccessor _this = this;
EObject _switchResult = null;
boolean _matched = false;
if (_this instanceof FunctionDefinition) {
_matched = true;
_switchResult = ((FunctionDefinition) _this).getDefinedType();
}
if (!_matched) {
if (_this instanceof org.eclipse.n4js.n4JS.FieldAccessor) {
_matched = true;
_switchResult = ((org.eclipse.n4js.n4JS.FieldAccessor) _this).getDefinedAccessor();
}
}
return ((IdentifiableElement) _switchResult);
}
use of org.eclipse.n4js.n4JS.FunctionOrFieldAccessor in project n4js by eclipse.
the class FunctionDeclarationImpl method getDefinedFunctionOrAccessor.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IdentifiableElement getDefinedFunctionOrAccessor() {
final FunctionOrFieldAccessor _this = this;
EObject _switchResult = null;
boolean _matched = false;
if (_this instanceof FunctionDefinition) {
_matched = true;
_switchResult = ((FunctionDefinition) _this).getDefinedType();
}
if (!_matched) {
if (_this instanceof FieldAccessor) {
_matched = true;
_switchResult = ((FieldAccessor) _this).getDefinedAccessor();
}
}
return ((IdentifiableElement) _switchResult);
}
use of org.eclipse.n4js.n4JS.FunctionOrFieldAccessor in project n4js by eclipse.
the class FunctionOrFieldAccessorImpl method getDefinedFunctionOrAccessor.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IdentifiableElement getDefinedFunctionOrAccessor() {
final FunctionOrFieldAccessor _this = this;
EObject _switchResult = null;
boolean _matched = false;
if (_this instanceof FunctionDefinition) {
_matched = true;
_switchResult = ((FunctionDefinition) _this).getDefinedType();
}
if (!_matched) {
if (_this instanceof FieldAccessor) {
_matched = true;
_switchResult = ((FieldAccessor) _this).getDefinedAccessor();
}
}
return ((IdentifiableElement) _switchResult);
}
Aggregations