protected void getAllLocalElements(TypeBucket bucket, JvmDeclaredType type, List<IEObjectDescription> result) { Iterable<JvmFeature> features = type.getAllFeatures(); for (JvmFeature feature : features) { if (feature.isStatic()) { addDescriptions(feature, bucket, result); } } }
@Override protected List<IEObjectDescription> getAllLocalElements() { Set<JvmFeature> allFeatures = Sets.newLinkedHashSet(); for(JvmType type: bucket.getTypes()) { if (type instanceof JvmDeclaredType) { Iterable<JvmFeature> features = ((JvmDeclaredType) type).getAllFeatures(); Iterables.addAll(allFeatures, features); } } if (allFeatures.isEmpty()) return Collections.emptyList(); List<IEObjectDescription> allDescriptions = Lists.newArrayListWithCapacity(allFeatures.size()); for(JvmFeature feature: allFeatures) { if (feature.isStatic() || (receiver == null && receiverType == null)) { addDescriptions(feature, allDescriptions); } } return allDescriptions; }
private Iterable<JvmOperation> getFixtureMethods(final JvmDeclaredType type) { final Function1<JvmOperation, Boolean> _function = (JvmOperation it) -> { return Boolean.valueOf(((Objects.equal(it.getVisibility(), JvmVisibility.PUBLIC) && (!it.isStatic())) && this.hasFixtureMethodAnnotation(it))); }; return IterableExtensions.<JvmOperation>filter(Iterables.<JvmOperation>filter(type.getAllFeatures(), JvmOperation.class), _function); }
protected void getAllLocalElements(TypeBucket bucket, JvmDeclaredType type, Set<String> restrictedNames, List<IEObjectDescription> result) { Iterable<JvmFeature> features = type.getAllFeatures(); for (JvmFeature feature : features) { if (feature.isStatic() && restrictedNames.contains(feature.getSimpleName())) { addDescriptions(feature, bucket, result); } } }
protected void computeAllFeatures( JvmDeclaredType type, Multimap<String, AbstractResolvedOperation> processedOperations, Set<String> processedFields, ListMultimap<String, JvmFeature> result, Set<String> seenNames) { Iterable<JvmFeature> features = type.getAllFeatures(); for(JvmFeature feature: features) { if (!seenNames.contains(feature.getSimpleName())) { if (feature instanceof JvmOperation) { JvmOperation operation = (JvmOperation) feature; String simpleName = operation.getSimpleName(); if (processedOperations.containsKey(simpleName)) { if (isOverridden(operation, processedOperations.get(simpleName))) { continue; } } BottomResolvedOperation resolvedOperation = createResolvedOperation(operation); processedOperations.put(simpleName, resolvedOperation); result.put(simpleName, operation); } else if (feature instanceof JvmField && processedFields.add(feature.getSimpleName())) { result.put(feature.getSimpleName(), feature); } } } }
@Override protected void getAllLocalElements(TypeBucket bucket, JvmDeclaredType type, Set<String> restrictedNames, List<IEObjectDescription> result) { Iterable<JvmFeature> features = type.getAllFeatures(); for(JvmFeature feature: features) { if (feature.isStatic() && restrictedNames.contains(feature.getSimpleName()) && helper.isPossibleExtension(feature) && helper.isMatchingFirstParameterDeepCheck((JvmOperation) feature)) { fastAddDescriptions(feature, bucket, result); } } }
@Override protected void getAllLocalElements(TypeBucket bucket, JvmDeclaredType type, List<IEObjectDescription> result) { Iterable<JvmFeature> features = type.getAllFeatures(); for(JvmFeature feature: features) { if (feature.isStatic() && helper.isPossibleExtension(feature) && helper.isMatchingFirstParameterDeepCheck((JvmOperation) feature)) { fastAddDescriptions(feature, bucket, result); } } }
/** Analyzing the type hierarchy of the given interface and * extract hierarchy information. * * @param jvmElement - the element to analyze * @param operations - filled with the operations inside and inherited by the element. * @param fields - filled with the fields inside and inherited by the element. * @param sarlSignatureProvider - provider of tools related to action signatures. * @see OverrideHelper */ public static void populateInterfaceElements( JvmDeclaredType jvmElement, Map<ActionPrototype, JvmOperation> operations, Map<String, JvmField> fields, IActionPrototypeProvider sarlSignatureProvider) { for (final JvmFeature feature : jvmElement.getAllFeatures()) { if (!"java.lang.Object".equals(feature.getDeclaringType().getQualifiedName())) { //$NON-NLS-1$ if (operations != null && feature instanceof JvmOperation) { final JvmOperation operation = (JvmOperation) feature; final ActionParameterTypes sig = sarlSignatureProvider.createParameterTypesFromJvmModel( operation.isVarArgs(), operation.getParameters()); final ActionPrototype actionKey = sarlSignatureProvider.createActionPrototype( operation.getSimpleName(), sig); operations.put(actionKey, operation); } else if (fields != null && feature instanceof JvmField) { fields.put(feature.getSimpleName(), (JvmField) feature); } } } }
|| (next instanceof XAssignment && currentThisType != null && !contains(currentThisType.getAllFeatures(), ((XAssignment) next).getFeature()))) { collectStaticImportsFrom((XAbstractFeatureCall) next, indexedAmbiguousCandidates.get(next)); } else {