private boolean shouldOverride(final JvmGenericType it, final String methodName) { final Function1<JvmOperation, Boolean> _function = new Function1<JvmOperation, Boolean>() { @Override public Boolean apply(final JvmOperation it) { String _simpleName = it.getSimpleName(); return Boolean.valueOf(Objects.equal(_simpleName, methodName)); } }; return IterableExtensions.<JvmOperation>exists(Iterables.<JvmOperation>filter(it.getAllFeatures(), JvmOperation.class), _function); }
private Iterable<JvmOperation> superTypeJvmOperations(final JvmGenericType type) { if ((type == null)) { return CollectionLiterals.<JvmOperation>emptyList(); } JvmType _type = IterableExtensions.<JvmTypeReference>head(type.getSuperTypes()).getType(); return Iterables.<JvmOperation>filter(((JvmGenericType) _type).getAllFeatures(), JvmOperation.class); } }
protected IScope _customScope(final JvmGenericType t) { final Function1<JvmOperation, Boolean> _function = new Function1<JvmOperation, Boolean>() { @Override public Boolean apply(final JvmOperation it) { boolean _isStatic = it.isStatic(); return Boolean.valueOf((!_isStatic)); } }; final Function<JvmOperation, QualifiedName> _function_1 = new Function<JvmOperation, QualifiedName>() { @Override public QualifiedName apply(final JvmOperation it) { QualifiedName _xifexpression = null; boolean _isGetterMethod = EmfParsleyDslScopeProvider.this.isGetterMethod(it.getSimpleName()); if (_isGetterMethod) { _xifexpression = QualifiedName.create(EmfParsleyDslScopeProvider.this.getPropertyNameForGetterMethod(it.getSimpleName())); } else { _xifexpression = null; } return _xifexpression; } }; Iterable<IEObjectDescription> _scopedElementsFor = Scopes.<JvmOperation>scopedElementsFor(IterableExtensions.<JvmOperation>filter(Iterables.<JvmOperation>filter(t.getAllFeatures(), JvmOperation.class), _function), _function_1); return new SimpleScope(_scopedElementsFor); }
protected JvmOperation findImplementingOperation(List<JvmType> rawTypes) { if (rawTypes.size() == 1) { JvmType rawType = rawTypes.get(0); if (rawType.eClass() == TypesPackage.Literals.JVM_GENERIC_TYPE) { JvmGenericType castedRawType = (JvmGenericType) rawType; if (!castedRawType.isFinal()) { Iterable<JvmFeature> features = castedRawType.getAllFeatures(); JvmOperation result = null; for (JvmFeature feature : features) { if (feature.eClass() == TypesPackage.Literals.JVM_OPERATION) { JvmOperation op = (JvmOperation) feature; if (isValidFunction(op)) { if (result == null) result = op; else { return null; } } } } return result; } } } return null; }
for (final JvmFeature feature : ((JvmGenericType) interfaceReference.getType()).getAllFeatures()) { if (!"java.lang.Object".equals(//$NON-NLS-1$ feature.getDeclaringType().getQualifiedName())) { for (final JvmFeature feature : parentType.getAllFeatures()) { if (!"java.lang.Object".equals(feature.getDeclaringType().getQualifiedName()) //$NON-NLS-1$ && isVisible(jvmElement, feature)
return Boolean.valueOf(Objects.equal(_simpleName, featureName)); }; final JvmField field = IterableExtensions.<JvmField>findFirst(Iterables.<JvmField>filter(((JvmGenericType)type).getAllFeatures(), JvmField.class), _function); if ((field == null)) { String _simpleName = ((JvmTypeReference)receiver).getSimpleName();