@Override public Map<String, ?> contentDescription(final URI uri, final Map<?, ?> options) throws IOException { return CollectionLiterals.<String, Object>emptyMap(); }
protected Map<String, JvmTypeReference> _collectDeclaredVariablesTypeMap(final TestStep testStep) { return CollectionLiterals.<String, JvmTypeReference>emptyMap(); }
protected Map<String, JvmTypeReference> _collectDeclaredVariablesTypeMap(final AssignmentThroughPath assignment) { return CollectionLiterals.<String, JvmTypeReference>emptyMap(); }
@Override public Map<String, ?> getAttributes(final URI uri, final Map<?, ?> options) { return CollectionLiterals.<String, Object>emptyMap(); }
public Map<? extends JvmType, ? extends Set<String>> getTypesToNames() { return CollectionLiterals.<JvmType, Set<String>>emptyMap(); }
protected Map<String, JvmTypeReference> _collectDeclaredVariablesTypeMap(final AssertionTestStep testStep) { return CollectionLiterals.<String, JvmTypeReference>emptyMap(); }
protected URI delete(final URI uri) { try { Map<Object, Object> _emptyMap = CollectionLiterals.<Object, Object>emptyMap(); this.inMemoryURIHandler.delete(uri, _emptyMap); return uri; } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
/** * Returns an immutable map containing the given entries. Repeated occurrences of a keys will cause an * {@link IllegalArgumentException}. * * @param entries * the entries that should be contained in the map. May not be <code>null</code> and may * not contain any <code>null</code> keys or values. * @return an immutable map containing the given entries. * @throws NullPointerException * if {@code entries} or any key or value in {@code entries} is <code>null</code> * @throws IllegalArgumentException * if duplicate keys are contained in {@code entries}. */ @Pure @SafeVarargs public static <K, V> Map<K, V> newImmutableMap(Pair<? extends K, ? extends V>... entries) { if (entries.length == 0) return emptyMap(); ImmutableMap.Builder<K, V> builder = ImmutableMap.builder(); for (Pair<? extends K, ? extends V> entry : entries) { builder.put(entry.getKey(), entry.getValue()); } return builder.build(); }
/** * Returns an immutable map containing the given entries. Repeated occurrences of a keys will cause an * {@link IllegalArgumentException}. * * @param entries * the entries that should be contained in the map. May not be <code>null</code> and may * not contain any <code>null</code> keys or values. * @return an immutable map containing the given entries. * @throws NullPointerException * if {@code entries} or any key or value in {@code entries} is <code>null</code> * @throws IllegalArgumentException * if duplicate keys are contained in {@code entries}. */ @Pure public static <K, V> Map<K, V> newImmutableMap(Pair<? extends K, ? extends V>... entries) { if (entries.length == 0) return emptyMap(); ImmutableMap.Builder<K, V> builder = ImmutableMap.builder(); for (Pair<? extends K, ? extends V> entry : entries) { builder.put(entry.getKey(), entry.getValue()); } return builder.build(); }
protected URI operator_minus(final String path, final String content) { try { final URI uri = this.uri(path); Map<Object, Object> _emptyMap = CollectionLiterals.<Object, Object>emptyMap(); OutputStream _createOutputStream = this.inMemoryURIHandler.createOutputStream(uri, _emptyMap); final Procedure1<OutputStream> _function = new Procedure1<OutputStream>() { @Override public void apply(final OutputStream it) { try { byte[] _bytes = content.getBytes(); it.write(_bytes); it.close(); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } }; ObjectExtensions.<OutputStream>operator_doubleArrow(_createOutputStream, _function); return uri; } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@FinalFieldsConstructor private static class Adapter<E extends Object> extends TypeAdapter<Collection<E>> { private final TypeAdapter<E> elementTypeAdapter; private final ObjectConstructor<? extends Collection<E>> constructor; @Override public Collection<E> read(final JsonReader in) throws IOException { final JsonToken peek = in.peek(); boolean _equals = Objects.equal(peek, JsonToken.NULL); if (_equals) { in.nextNull(); return null; } else { boolean _equals_1 = Objects.equal(peek, JsonToken.BEGIN_ARRAY); if (_equals_1) { final Collection<E> collection = this.constructor.construct(); in.beginArray(); while (in.hasNext()) { { final E instance = this.elementTypeAdapter.read(in); collection.add(instance); } } in.endArray(); return collection; } else { final Collection<E> collection_1 = this.constructor.construct(); final E instance = this.elementTypeAdapter.read(in); collection_1.add(instance);
resource.load(_stringInputStream, CollectionLiterals.<Object, Object>emptyMap()); final XtextWebDocument document = this.documentProvider.get(resourceId, context); document.setInput(resource);
public String format(final String xtendCode) { try { final XtextResourceSet resourceSet = new XtextResourceSet(); Resource _createResource = this.resourceFactory.createResource(URI.createURI("synthetic://to-be-formatted.xtend")); final XtextResource resource = ((XtextResource) _createResource); EList<Resource> _resources = resourceSet.getResources(); _resources.add(resource); StringInputStream _stringInputStream = new StringInputStream(xtendCode); resource.load(_stringInputStream, CollectionLiterals.<Object, Object>emptyMap()); final ITextRegionAccess regionAccess = this.regionAccessBuilder.get().forNodeModel(resource).create(); FormatterRequest _formatterRequest = new FormatterRequest(); final Procedure1<FormatterRequest> _function = (FormatterRequest it) -> { it.setAllowIdentityEdits(false); it.setTextRegionAccess(regionAccess); it.setPreferences(TypedPreferenceValues.castOrWrap(this.cfgProvider.getPreferenceValues(resource))); }; FormatterRequest request = ObjectExtensions.<FormatterRequest>operator_doubleArrow(_formatterRequest, _function); List<ITextReplacement> replacements = this.formatter.format(request); return regionAccess.getRewriter().renderToString(replacements); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } }