@Override public String getValueName() { JvmOperation operation = getOperation(); if (operation == null || operation.eIsProxy()) return null; return operation.getSimpleName(); }
@Override public String getValueName() { JvmOperation operation = getOperation(); if (operation == null || operation.eIsProxy()) return null; return operation.getSimpleName(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmOperation getOperation() { if (operation != null && operation.eIsProxy()) { InternalEObject oldOperation = (InternalEObject)operation; operation = (JvmOperation)eResolveProxy(oldOperation); if (operation != oldOperation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmlPackage.METHOD_REFERENCE__OPERATION, oldOperation, operation)); } } return operation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmOperation getElement() { if (element != null && element.eIsProxy()) { InternalEObject oldElement = (InternalEObject)element; element = (JvmOperation)eResolveProxy(oldElement); if (element != oldElement) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, oldElement, element)); } } return element; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmOperation getOperation() { if (operation != null && operation.eIsProxy()) { InternalEObject oldOperation = (InternalEObject)operation; operation = (JvmOperation)eResolveProxy(oldOperation); if (operation != oldOperation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TypesPackage.JVM_ANNOTATION_VALUE__OPERATION, oldOperation, operation)); } } return operation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmOperation getOperation() { if (operation != null && operation.eIsProxy()) { InternalEObject oldOperation = (InternalEObject)operation; operation = (JvmOperation)eResolveProxy(oldOperation); if (operation != oldOperation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TypesPackage.JVM_ANNOTATION_VALUE__OPERATION, oldOperation, operation)); } } return operation; }
private void checkForImpureJavaCallsInternal(XExpression xExpression) { Iterator<EObject> eAllContents = Iterators.concat(Iterators.singletonIterator(xExpression), xExpression.eAllContents()); while (eAllContents.hasNext()) { EObject nextEObject = eAllContents.next(); if (nextEObject instanceof XMemberFeatureCall) { XMemberFeatureCall xFeatureCall = (XMemberFeatureCall) nextEObject; JvmIdentifiableElement jvmIdentifiableElement = xFeatureCall.getFeature(); if (jvmIdentifiableElement instanceof JvmOperation) { JvmOperation jvmOperation = (JvmOperation) jvmIdentifiableElement; if (!jvmOperation.eIsProxy() && !isPure(jvmOperation)) { warning("Impure method call " + jvmOperation.getQualifiedName(), xFeatureCall, XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE, IssueCodes.CHECK_WITH_IMPURE_JAVA_CALLS); } } } } }
private void checkForImpureJavaCallsInternal(XExpression xExpression, EStructuralFeature feature) { Set<String> elementsWithWarnings = new HashSet<String>(); if (xExpression != null) { TreeIterator<EObject> eAllContents = xExpression.eAllContents(); while (eAllContents.hasNext()) { EObject nextEObject = eAllContents.next(); if (nextEObject instanceof XMemberFeatureCall) { XMemberFeatureCall xFeatureCall = (XMemberFeatureCall) nextEObject; JvmIdentifiableElement jvmIdentifiableElement = xFeatureCall.getFeature(); if (jvmIdentifiableElement instanceof JvmOperation) { JvmOperation jvmOperation = (JvmOperation) jvmIdentifiableElement; if (!PurityChecker.isPure(jvmOperation) && !jvmOperation.eIsProxy()) { elementsWithWarnings.add(jvmOperation.getQualifiedName()); } } } } } if (!elementsWithWarnings.isEmpty()) { warning("There is at least one potentially problematic java call in the check()/eval() expression. Custom java calls " + "are considered unsafe in IncQuery unless they are annotated with @" + Pure.class.getSimpleName() + " or registered with the " + PureWhitelistExtensionLoader.EXTENSION_ID + " extension point. The possible erroneous calls are the following: " + elementsWithWarnings + ".", xExpression.eContainer(), feature, IssueCodes.CHECK_WITH_IMPURE_JAVA_CALLS); } }
public boolean covers(final JvmOperation jvmOperation) { boolean _xifexpression = false; boolean _eIsProxy = jvmOperation.eIsProxy(); if (_eIsProxy) { _xifexpression = false;
public boolean covers(final JvmOperation jvmOperation) { boolean _xifexpression = false; boolean _eIsProxy = jvmOperation.eIsProxy(); if (_eIsProxy) { _xifexpression = false;
LightweightTypeReference expectation = operation == null || operation.eIsProxy() ? null : state.getReferenceOwner().toLightweightTypeReference(operation.getReturnType()); if (expectation != null && expectation.isArray()) { LightweightTypeReference componentType = expectation.getComponentType();