@Override public JvmGenericType getInferredType(SarlSkill obj) { return getFirstOrNull(getJvmElements(obj), JvmGenericType.class); }
@Override public JvmOperation getInferredBodyOperation(SarlBehaviorUnit behaviorUnit) { final EObject primaryJvmElement = getPrimaryJvmElement(behaviorUnit); if (primaryJvmElement instanceof JvmOperation) { return (JvmOperation) primaryJvmElement; } return null; }
@Override public SarlSkill getSarlSkill(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlSkill) { return (SarlSkill) primarySourceElement; } return null; }
@Override public XtendField getXtendField(JvmField jvmField) { XtendField fld = null; try { fld = super.getXtendField(jvmField); } catch (Throwable exception) { fld = null; } if (fld == null) { for (final EObject obj : getSourceElements(jvmField)) { if (obj instanceof XtendField) { fld = (XtendField) obj; break; } } } return fld; }
@Override public XtendFunction getXtendFunction(JvmOperation jvmOperation) { XtendFunction fct = null; try { fct = super.getXtendFunction(jvmOperation); } catch (Throwable exception) { fct = null; } if (fct == null) { for (final EObject obj : getSourceElements(jvmOperation)) { if (obj instanceof XtendFunction) { fct = (XtendFunction) obj; break; } } } return fct; }
@Override public XtendConstructor getXtendConstructor(JvmConstructor jvmConstructor) { XtendConstructor cons = null; try { cons = super.getXtendConstructor(jvmConstructor); } catch (Throwable exception) { cons = null; } if (cons == null) { for (final EObject obj : getSourceElements(jvmConstructor)) { if (obj instanceof XtendConstructor) { cons = (XtendConstructor) obj; break; } } } return cons; }
@Override public JvmGenericType getInferredType(XtendClass xtendClass) { return getFirstOrNull(getJvmElements(xtendClass), JvmGenericType.class); }
@Override public JvmGenericType getInferredType(SarlBehavior obj) { return getFirstOrNull(getJvmElements(obj), JvmGenericType.class); }
@Override public JvmGenericType getInferredType(SarlEvent obj) { return getFirstOrNull(getJvmElements(obj), JvmGenericType.class); }
@Override public SarlArtifact getSarlArtifact(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlArtifact) { return (SarlArtifact) primarySourceElement; } return null; }
@Override public SarlSpace getSarlSpace(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlSpace) { return (SarlSpace) primarySourceElement; } return null; }
@Override public SarlConstructor getSarlConstructor(JvmConstructor jvmConstructor) { final XtendConstructor cons = getXtendConstructor(jvmConstructor); return cons instanceof SarlConstructor ? (SarlConstructor) cons : null; }
@Override public SarlAnnotationType getSarlAnnotationType(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlAnnotationType) { return (SarlAnnotationType) primarySourceElement; } return null; }
@Override public SarlCapacity getSarlCapacity(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlCapacity) { return (SarlCapacity) primarySourceElement; } return null; }
@Override public SarlField getSarlField(JvmField jvmField) { final XtendField fld = getXtendField(jvmField); return fld instanceof SarlField ? (SarlField) fld : null; }
@Override public SarlInterface getSarlInterface(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlInterface) { return (SarlInterface) primarySourceElement; } return null; }
@Override public SarlEvent getSarlEvent(JvmGenericType jvmType) { final EObject primarySourceElement = getPrimarySourceElement(jvmType); if (primarySourceElement instanceof SarlEvent) { return (SarlEvent) primarySourceElement; } return null; }
@Override public SarlAction getSarlAction(JvmOperation jvmOperation) { final XtendFunction fct = getXtendFunction(jvmOperation); return fct instanceof SarlAction ? (SarlAction) fct : null; }
@Override public JvmOperation getInferredGuardOperation(SarlBehaviorUnit behaviorUnit) { final XExpression guard = behaviorUnit.getGuard(); if (guard != null) { final EObject primaryJvmElement = getPrimaryJvmElement(guard); if (primaryJvmElement instanceof JvmOperation) { return (JvmOperation) primaryJvmElement; } } return null; }
@Override public JvmGenericType getInferredType(SarlCapacity obj) { return getFirstOrNull(getJvmElements(obj), JvmGenericType.class); }