protected Set<String> uniqueEntries(final Iterable<String> pathes) { final Function1<String, String> _function = (String it) -> { return new File(it).getAbsolutePath(); }; return IterableExtensions.<String>toSet(IterableExtensions.<String, String>map(pathes, _function)); }
protected Collection<Enumeration> _getUsedEnums(final ResourceAPI resourceAPI) { final Function1<ServiceDataResource, Collection<Enumeration>> _function = (ServiceDataResource dataInterface) -> { return this.getUsedEnums(dataInterface); }; return IterableExtensions.<Enumeration>toSet(Iterables.<Enumeration>concat(IterableExtensions.<ServiceDataResource, Collection<Enumeration>>map(Iterables.<ServiceDataResource>filter(resourceAPI.getOwnedResourceDefinitions(), ServiceDataResource.class), _function))); }
private Set<IClassAnnotation> getClassAnnotations() { final Function1<IClassAnnotation, Boolean> _function = (IClassAnnotation it) -> { return Boolean.valueOf(it.appliesTo(this)); }; Iterable<IClassAnnotation> _filter = IterableExtensions.<IClassAnnotation>filter(this.codeConfig.getClassAnnotations(), _function); return IterableExtensions.<IClassAnnotation>toSet(Iterables.<IClassAnnotation>concat(this.annotations, _filter)); }
/** * @return all interaction types of a {@link ComponentElement}. */ public Set<InteractionType> getComponentElementInteractionTypes(final ComponentElement element) { return IterableExtensions.<InteractionType>toSet(element.getType().getInteractionTypes()); }
protected Collection<Enumeration> _getUsedEnums(final ZenModel model) { final Function1<ResourceAPI, Collection<Enumeration>> _function = (ResourceAPI it) -> { return this.getUsedEnums(it); }; return IterableExtensions.<Enumeration>toSet(Iterables.<Enumeration>concat(ListExtensions.<ResourceAPI, Collection<Enumeration>>map(model.getResourceAPIs(), _function))); }
protected Collection<UserDefinedType> _getUsedUserDefinedTypes(final ZenModel model) { final Function1<ResourceAPI, Collection<UserDefinedType>> _function = (ResourceAPI it) -> { return this.getUsedUserDefinedTypes(it); }; return IterableExtensions.<UserDefinedType>toSet(Iterables.<UserDefinedType>concat(ListExtensions.<ResourceAPI, Collection<UserDefinedType>>map(model.getResourceAPIs(), _function))); }
/** * @return all interaction types of the {@link Component}. */ public Set<InteractionType> getComponentInteractionTypes(final Component component) { final Function1<ComponentType, EList<InteractionType>> _function = (ComponentType it) -> { return it.getInteractionTypes(); }; return IterableExtensions.<InteractionType>toSet(Iterables.<InteractionType>concat(IterableExtensions.<ComponentType, EList<InteractionType>>map(this.getTypes(component), _function))); }
protected Collection<Enumeration> _getUsedEnums(final ReferenceTreatment ref) { final Function1<Object, Collection<Enumeration>> _function = (Object it) -> { return this.getUsedEnums(it); }; return IterableExtensions.<Enumeration>toSet(Iterables.<Enumeration>concat(ListExtensions.map(this.getReferenceTreatmentIncludedProperties(ref), _function))); }
protected Collection<UserDefinedType> _getUsedUserDefinedTypes(final ReferenceTreatment ref) { final Function1<Object, Collection<UserDefinedType>> _function = (Object it) -> { return this.getUsedUserDefinedTypes(it); }; return IterableExtensions.<UserDefinedType>toSet(Iterables.<UserDefinedType>concat(ListExtensions.map(this.getReferenceTreatmentIncludedProperties(ref), _function))); }
/** * @return all interaction types of the {@link Component} as well as its elements. */ public Set<InteractionType> getAllInteractionTypes(final Component component) { if ((component != null)) { Set<InteractionType> _componentInteractionTypes = this.getComponentInteractionTypes(component); Set<InteractionType> _componentElementsInteractionTypes = this.getComponentElementsInteractionTypes(component); return IterableExtensions.<InteractionType>toSet(Iterables.<InteractionType>concat(_componentInteractionTypes, _componentElementsInteractionTypes)); } return CollectionLiterals.<InteractionType>emptySet(); }
/** * @return all interaction types of the component's elements. */ public Set<InteractionType> getComponentElementsInteractionTypes(final Component component) { final Set<ComponentElement> componentElements = this.getComponentElements(component); final Function1<ComponentElement, Set<InteractionType>> _function = (ComponentElement it) -> { return this.getComponentElementInteractionTypes(it); }; return IterableExtensions.<InteractionType>toSet(Iterables.<InteractionType>concat(IterableExtensions.<ComponentElement, Set<InteractionType>>map(componentElements, _function))); }
private Set<JvmType> _getTestStepFixtureTypes(final ComponentTestStepContext context) { final Set<InteractionType> interactionTypes = IterableExtensions.<InteractionType>toSet(this._modelUtil.getAllInteractionTypes(context.getComponent())); final Function1<InteractionType, JvmType> _function = (InteractionType it) -> { return this._modelUtil.getFixtureType(it); }; final Set<JvmType> fixtureTypes = IterableExtensions.<JvmType>toSet(IterableExtensions.<JvmType>filterNull(IterableExtensions.<InteractionType, JvmType>map(interactionTypes, _function))); return fixtureTypes; }
@Override public Set<Modifier> getModifiers() { final Function1<String, Modifier> _function = (String it) -> { return Modifier.valueOf(it.toUpperCase()); }; return IterableExtensions.<Modifier>toSet(ListExtensions.<String, Modifier>map(this.getDelegate().getModifiers(), _function)); }
private Iterable<? extends IResourceServiceProvider> getAllLanguages() { final Function1<String, IResourceServiceProvider> _function = (String ext) -> { final URI synthUri = URI.createURI(("synth:///file." + ext)); return this.languagesRegistry.getResourceServiceProvider(synthUri); }; return IterableExtensions.<IResourceServiceProvider>toSet(ListExtensions.<String, IResourceServiceProvider>map(IterableExtensions.<String>sort(IterableExtensions.<String>toList(this.languagesRegistry.getExtensionToFactoryMap().keySet())), _function)); }
public Set<TypeReference> getImplementedInterfaces(final TypeReference it) { Set<TypeReference> _xblockexpression = null; { final LinkedHashSet<TypeReference> seen = CollectionLiterals.<TypeReference>newLinkedHashSet(); this.collectAllSuperTypes(it, seen); final Function1<TypeReference, Boolean> _function = (TypeReference it_1) -> { Type _type = it_1.getType(); return Boolean.valueOf((_type instanceof InterfaceDeclaration)); }; _xblockexpression = IterableExtensions.<TypeReference>toSet(IterableExtensions.<TypeReference>filter(seen, _function)); } return _xblockexpression; }
public Iterable<String> getKeywords() { final Function1<Keyword, Boolean> _function = (Keyword it) -> { return Boolean.valueOf(Character.isLetter(it.getValue().charAt(0))); }; final Function1<Keyword, String> _function_1 = (Keyword it) -> { return it.getValue(); }; return IterableExtensions.<String>sort(IterableExtensions.<String>toSet(IterableExtensions.<Keyword, String>map(IterableExtensions.<Keyword>filter(GrammarUtil.containedKeywords(this.grammarAccess.getGrammar()), _function), _function_1))); } }
/** * check that this variableReference is used according to its (expected) type */ private void checkVariableReferenceIsUsedWellTyped(final VariableReference variableReference, final Map<String, JvmTypeReference> declaredVariablesTypeMap, final TestStepContext context, final int errorReportingIndex) { final String varName = variableReference.getVariable().getName(); final Set<Optional<JvmTypeReference>> typeUsageSet = IterableExtensions.<Optional<JvmTypeReference>>toSet(IterableExtensions.<Optional<JvmTypeReference>>filterNull(this.typeUsageComputer.getAllPossibleTypeUsagesOfVariable(context, varName))); final JvmTypeReference typeDeclared = declaredVariablesTypeMap.get(varName); this.checkVariableReferenceIsWellTyped(variableReference, typeUsageSet, typeDeclared, errorReportingIndex); }
/** * Returns all grammars from the hierarchy that are used from rules of this grammar. */ protected List<Grammar> getEffectivelyUsedGrammars(final Grammar grammar) { final Function1<AbstractRule, Grammar> _function = (AbstractRule it) -> { return GrammarUtil.getGrammar(it); }; final Function1<Grammar, Boolean> _function_1 = (Grammar it) -> { return Boolean.valueOf((it != grammar)); }; return IterableExtensions.<Grammar>toList(IterableExtensions.<Grammar>toSet(IterableExtensions.<Grammar>filter(ListExtensions.<AbstractRule, Grammar>map(GrammarUtil.allRules(grammar), _function), _function_1))); }
public Set<TypeReference> listedInterfaces(final MemberDeclaration it) { return IterableExtensions.<TypeReference>toSet(((Iterable<TypeReference>)Conversions.doWrapArray(it.findAnnotation(this.context.findTypeGlobally(Delegate.class)).getClassArrayValue("value")))); }
@Override public Set<Path> getProjectSourceFolders(final Path path) { final Function1<ISourceFolder, Path> _function = (ISourceFolder it) -> { return this.getProjectFolder(path).append(it.getName()); }; return IterableExtensions.<Path>toSet(IterableExtensions.map(this.getProjectConfig(path).getSourceFolders(), _function)); }