/** * Creates a mutable {@link List} instance containing the given initial elements. * * @param elements * the initial elements that the list should contain, in order. May not be <code>null</code> but may * contain <code>null</code> values. * @return a new {@link List} containing those elements */ public static <T> List<T> list(T... elements){ return newArrayList(elements); }
@Override protected List<EPackage> getEPackages() { return CollectionLiterals.<EPackage>newArrayList(XtendPackage.eINSTANCE, XbasePackage.eINSTANCE, XAnnotationsPackage.eINSTANCE); }
@Override public Iterable<QualifiedName> getImportedNames() { return Collections.<QualifiedName>unmodifiableList(CollectionLiterals.<QualifiedName>newArrayList()); }
@Override protected List<EPackage> getEPackages() { return Collections.<EPackage>unmodifiableList(CollectionLiterals.<EPackage>newArrayList(TclPackage.eINSTANCE)); }
public BuildManager.Buildable didClose(final URI uri) { this.openDocuments.remove(uri); boolean _exists = this.exists(uri); if (_exists) { return this.didChangeFiles(Collections.<URI>unmodifiableList(CollectionLiterals.<URI>newArrayList(uri)), CollectionLiterals.<URI>newArrayList()); } return this.didChangeFiles(CollectionLiterals.<URI>newArrayList(), Collections.<URI>unmodifiableList(CollectionLiterals.<URI>newArrayList(uri))); }
private List<String> getSetupModules() { List<String> _elvis = null; Object _get = this.context.getGenTargetParameters().get("setupModules"); if (((List<String>) _get) != null) { _elvis = ((List<String>) _get); } else { _elvis = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList()); } return _elvis; } }
protected List<? extends IXtextGeneratorFragment> getImplicitFragments() { final ArrayList<ImplicitFragment> fragments = CollectionLiterals.<ImplicitFragment>newArrayList(); ImplicitFragment _implicitFragment = new ImplicitFragment(); fragments.add(_implicitFragment); return fragments; }
private List<String> getMiddlewares() { List<String> _elvis = null; Object _get = this.context.getGenTargetParameters().get("middlewareModules"); if (((List<String>) _get) != null) { _elvis = ((List<String>) _get); } else { _elvis = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList()); } return _elvis; }
private List<LinkSpec> _resolveLinkStrategy(final LinkSwitch strategy, final RealizationContext context) { final Optional<ConditionalLink> link = ContextMatcher.<ConditionalLink>evalSwitch(context, strategy); boolean _isPresent = link.isPresent(); if (_isPresent) { return this.resolveLinkStrategy(link.get(), context); } else { return Collections.<LinkSpec>unmodifiableList(CollectionLiterals.<LinkSpec>newArrayList()); } }
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; }
public TypeResourceDescription(final QualifiedName typeName) { this.uri = URIHelperConstants.OBJECTS_URI.appendSegment(typeName.toString(".")); TypeResourceDescription.ClassDescription _classDescription = new TypeResourceDescription.ClassDescription(typeName); this.exportedObjects = Collections.<IEObjectDescription>unmodifiableList(CollectionLiterals.<IEObjectDescription>newArrayList(_classDescription)); }
private String getDefaultTypeSpec(final Object obj, final AttrDetails det) { String _type = this._attributeHelper.getType(obj); String _rzveTypeName = this._attributeHelper.getRzveTypeName(obj); final Function1<String, Boolean> _function = (String it) -> { return Boolean.valueOf((it != null)); }; return IterableExtensions.<String>last(IterableExtensions.<String>filter(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(_type, _rzveTypeName)), _function)); }
public void setDefaults() { this.runtime.setEnabled(true); final Function1<SubProjectConfig, Boolean> _function = (SubProjectConfig it) -> { return Boolean.valueOf(it.isEnabled()); }; boolean _exists = IterableExtensions.exists(Collections.<SubProjectConfig>unmodifiableList(CollectionLiterals.<SubProjectConfig>newArrayList(this.eclipsePlugin, this.ideaPlugin, this.web)), _function); if (_exists) { this.genericIde.setEnabled(true); } }
public String getSchemaTitle(final Schema schema) { String _kaiZenSchemaName = this.getKaiZenSchemaName(schema); String _title = schema.getTitle(); String _rzveTypeName = this.getRzveTypeName(schema); final Function1<String, Boolean> _function = (String it) -> { return Boolean.valueOf((it != null)); }; return IterableExtensions.<String>head(IterableExtensions.<String>filter(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(_kaiZenSchemaName, _title, _rzveTypeName, "UNKNOWN")), _function)); }
public IncrementalBuilder.Result doInitialBuild(final CancelIndicator cancelIndicator) { final ArrayList<URI> uris = CollectionLiterals.<URI>newArrayList(); final Consumer<ISourceFolder> _function = (ISourceFolder it) -> { final IAcceptor<URI> _function_1 = (URI it_1) -> { uris.add(it_1); }; this.fileSystemScanner.scan(it.getPath(), _function_1); }; this.projectConfig.getSourceFolders().forEach(_function); return this.doBuild(uris, CollectionLiterals.<URI>emptyList(), CollectionLiterals.<IResourceDescription.Delta>emptyList(), cancelIndicator); }
protected List<ISyntacticSequencerPDAProvider.ISynAbsorberState> getAllPDAs() { final Function1<SerializationContextMap.Entry<ISyntacticSequencerPDAProvider.ISynAbsorberState>, ISyntacticSequencerPDAProvider.ISynAbsorberState> _function = (SerializationContextMap.Entry<ISyntacticSequencerPDAProvider.ISynAbsorberState> it) -> { return it.getValue(); }; return CollectionLiterals.<ISyntacticSequencerPDAProvider.ISynAbsorberState>newArrayList(((ISyntacticSequencerPDAProvider.ISynAbsorberState[])Conversions.unwrapArray(ListExtensions.<SerializationContextMap.Entry<ISyntacticSequencerPDAProvider.ISynAbsorberState>, ISyntacticSequencerPDAProvider.ISynAbsorberState>map(this.pdaProvider.getSyntacticSequencerPDAs(this.grammar).values(), _function), ISyntacticSequencerPDAProvider.ISynAbsorberState.class))); }
protected String elementAliasToIdentifier(final GrammarAlias.AbstractElementAlias alias) { final Set<String> rulesSet = CollectionLiterals.<String>newHashSet(); final String body = this.elementAliasToIdentifier(alias, rulesSet, false); final List<String> rulesList = CollectionLiterals.<String>newArrayList(((String[])Conversions.unwrapArray(rulesSet, String.class))); ListExtensions.<String>sortInplace(rulesList); final String rule = IterableExtensions.join(rulesList, "_"); return ((rule + "_") + body); } }
@Override public void generate() { this.addRuntimeGuiceBindings(); this.addEclipsePluginGuiceBindings(); ManifestAccess _manifest = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.xtext.builder", "org.eclipse.xtext.ui"))); } }
public Collection<EitherTypeArgument> getChildTypes(final TypeReference typeReference) { final ArrayList<EitherTypeArgument> types = CollectionLiterals.<EitherTypeArgument>newArrayList(); boolean _isEither = this.isEither(typeReference); if (_isEither) { this.collectChildTypes(this.getLeftType(typeReference), null, false, types); this.collectChildTypes(this.getRightType(typeReference), null, true, types); } return types; }
public Collection<EitherTypeArgument> getChildTypes(final TypeReference typeReference) { final ArrayList<EitherTypeArgument> types = CollectionLiterals.<EitherTypeArgument>newArrayList(); boolean _isEither = this.isEither(typeReference); if (_isEither) { this.collectChildTypes(this.getLeftType(typeReference), null, false, types); this.collectChildTypes(this.getRightType(typeReference), null, true, types); } return types; }