public Iterable<ContentAssistEntry> getEntries() { final Function1<Pair<Integer, ContentAssistEntry>, ContentAssistEntry> _function = (Pair<Integer, ContentAssistEntry> it) -> { return it.getValue(); }; return IterableExtensions.<Pair<Integer, ContentAssistEntry>, ContentAssistEntry>map(this.entries, _function); } }
private URLClassLoader createURLClassLoader(final Iterable<String> classPathEntries) { final Function1<String, URL> _function = (String str) -> { try { return new File(str).toURI().toURL(); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }; final Iterable<URL> classPathUrls = IterableExtensions.<String, URL>map(classPathEntries, _function); return new URLClassLoader(((URL[])Conversions.unwrapArray(classPathUrls, URL.class))); }
public AlternateJdkLoader(final Iterable<File> files) { super(((URL[])Conversions.unwrapArray(IterableExtensions.<File, URL>map(files, ((Function1<File, URL>) (File it) -> { try { return it.toURI().toURL(); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } })), URL.class))); }
public boolean isObjectMethod(final ResolvedMethod it) { boolean _xblockexpression = false; { final String name = it.getDeclaration().getSimpleName(); final Function1<ResolvedParameter, TypeReference> _function = (ResolvedParameter it_1) -> { return it_1.getResolvedType(); }; final List<TypeReference> parameterTypes = IterableExtensions.<TypeReference>toList(IterableExtensions.map(it.getResolvedParameters(), _function)); _xblockexpression = (((((Objects.equal(name, "hashCode") && parameterTypes.isEmpty()) || (Objects.equal(name, "toString") && parameterTypes.isEmpty())) || (Objects.equal(name, "equals") && Objects.equal(parameterTypes, Collections.<TypeReference>unmodifiableList(CollectionLiterals.<TypeReference>newArrayList(this.context.getObject()))))) || (Objects.equal(name, "finalize") && parameterTypes.isEmpty())) || (Objects.equal(name, "clone") && parameterTypes.isEmpty())); } return _xblockexpression; }
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))); }
protected void _setValue(final JvmTypeAnnotationValue it, final TypeReference[] value, final String componentType, final boolean mustBeArray) { EList<JvmTypeReference> _values = it.getValues(); final Function1<TypeReferenceImpl, JvmTypeReference> _function = (TypeReferenceImpl it_1) -> { return this.compilationUnit.toJvmTypeReference(it_1); }; Iterable<JvmTypeReference> _map = IterableExtensions.<TypeReferenceImpl, JvmTypeReference>map(Iterables.<TypeReferenceImpl>filter(((Iterable<?>)Conversions.doWrapArray(value)), TypeReferenceImpl.class), _function); Iterables.<JvmTypeReference>addAll(_values, _map); }
protected Iterable<EPackage> getGeneratedPackagesToValidate() { final Function1<GeneratedMetamodel, EPackage> _function = (GeneratedMetamodel it) -> { return it.getEPackage(); }; return IterableExtensions.<GeneratedMetamodel, EPackage>map(Iterables.<GeneratedMetamodel>filter(this.getGrammar().getMetamodelDeclarations(), GeneratedMetamodel.class), _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))); }
private Iterable<String> getPathToAtomLinkWithNs(final ReferenceLink referenceLink, final ServiceDataResource containingDataResource) { Iterable<String> _xblockexpression = null; { final String nsPrefix = this.traceHelper.getNsPrefix(this._wadlHelper.<ResourceAPI>getEContainer(referenceLink, ResourceAPI.class)); final Function1<String, String> _function = (String it) -> { return ((nsPrefix + ":") + it); }; _xblockexpression = IterableExtensions.<String, String>map(this.getPathToAtomLink(referenceLink, containingDataResource), _function); } return _xblockexpression; }
protected Collection<EPackage> getRegistryPackagesToValidate() { final Collection<EPackage> packages = GrammarUtil.allEPackagesToValidate(this.getGrammar()); final Function1<GeneratedMetamodel, EPackage> _function = (GeneratedMetamodel it) -> { return it.getEPackage(); }; packages.removeAll(IterableExtensions.<EPackage>toList(IterableExtensions.<GeneratedMetamodel, EPackage>map(Iterables.<GeneratedMetamodel>filter(GrammarUtil.allMetamodelDeclarations(this.getGrammar()), GeneratedMetamodel.class), _function))); return packages; }
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))); } }
public Iterable<FEnumerationType> getEnumDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isEnum(type)); }; final Function1<FType, FEnumerationType> _function_1 = (FType type) -> { return this._typeUtil.getEnumType(type); }; return IterableExtensions.<FEnumerationType>filterNull(IterableExtensions.<FType, FEnumerationType>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
public Iterable<FTypeDef> getTypeDefDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isTypeDef(type)); }; final Function1<FType, FTypeDef> _function_1 = (FType type) -> { return this._typeUtil.getTypeDefType(type); }; return IterableExtensions.<FTypeDef>filterNull(IterableExtensions.<FType, FTypeDef>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
@Override public MethodDeclaration findDeclaredMethod(final String name, final TypeReference... parameterTypes) { final Function1<MethodDeclaration, Boolean> _function = (MethodDeclaration method) -> { return Boolean.valueOf((Objects.equal(method.getSimpleName(), name) && Objects.equal(IterableExtensions.<TypeReference>toList(IterableExtensions.map(method.getParameters(), ((Function1<ParameterDeclaration, TypeReference>) (ParameterDeclaration it) -> { return it.getType(); }))), IterableExtensions.<TypeReference>toList(((Iterable<TypeReference>)Conversions.doWrapArray(parameterTypes)))))); }; return IterableExtensions.findFirst(this.getDeclaredMethods(), _function); }
@Override public ConstructorDeclaration findDeclaredConstructor(final TypeReference... parameterTypes) { final Function1<ConstructorDeclaration, Boolean> _function = (ConstructorDeclaration constructor) -> { final Function1<ParameterDeclaration, TypeReference> _function_1 = (ParameterDeclaration it) -> { return it.getType(); }; List<TypeReference> _list = IterableExtensions.<TypeReference>toList(IterableExtensions.map(constructor.getParameters(), _function_1)); List<TypeReference> _list_1 = IterableExtensions.<TypeReference>toList(((Iterable<TypeReference>)Conversions.doWrapArray(parameterTypes))); return Boolean.valueOf(Objects.equal(_list, _list_1)); }; return IterableExtensions.findFirst(this.getDeclaredConstructors(), _function); }
private TypeReference newWildCardSelfTypeReference(final ClassDeclaration cls) { final Function1<TypeParameterDeclaration, TypeReference> _function = (TypeParameterDeclaration it) -> { return this.context.newWildcardTypeReference(this.context.getObject()); }; return this.context.newTypeReference(cls, ((TypeReference[])Conversions.unwrapArray(IterableExtensions.map(cls.getTypeParameters(), _function), TypeReference.class))); }
private Iterable<Pair<String, String>> getProjectMappings() { final Function1<ISubProjectConfig, Boolean> _function = (ISubProjectConfig it) -> { return Boolean.valueOf(((it.getName() != null) && (it.getRoot() != null))); }; final Function1<ISubProjectConfig, Pair<String, String>> _function_1 = (ISubProjectConfig it) -> { String _name = it.getName(); String _path = it.getRoot().getPath(); return Pair.<String, String>of(_name, _path); }; return IterableExtensions.map(IterableExtensions.filter(this.projectConfig.getEnabledProjects(), _function), _function_1); }
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<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)); }
public NamedSerializationContextProvider(final Grammar grammar) { final Function1<Pair<Integer, ParserRule>, Pair<ParserRule, Integer>> _function = (Pair<Integer, ParserRule> it) -> { ParserRule _value = it.getValue(); Integer _key = it.getKey(); return Pair.<ParserRule, Integer>of(_value, _key); }; this.rules = CollectionLiterals.<ParserRule, Integer>newHashMap(((Pair<? extends ParserRule, ? extends Integer>[])Conversions.unwrapArray(IterableExtensions.<Pair<Integer, ParserRule>, Pair<ParserRule, Integer>>map(IterableExtensions.<ParserRule>indexed(GrammarUtil.allParserRules(grammar)), _function), Pair.class))); }