public String[] getAntlrParams() { ArrayList<String> params = Lists.<String>newArrayList(this.antlrParams); boolean _contains = params.contains("-Xconversiontimeout"); boolean _not = (!_contains); if (_not) { params.add(0, "-Xconversiontimeout"); params.add(1, "100000"); } return ((String[])Conversions.unwrapArray(params, String.class)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getArity() { EList<Object> _constantValues = this.getConstantValues(); return ((Object[])org.eclipse.xtext.xbase.lib.Conversions.unwrapArray(_constantValues, Object.class)).length; }
@Override public QualifiedName getQualifiedName() { return QualifiedName.create(((String[])Conversions.unwrapArray(ClasspathTypeDescriptor.PACKAGE_AND_NESTED_CLASS_SPLITTER.split(this.name), String.class))); }
public void apply(final AnnotationReferenceBuildContext it) { it.setClassValue("value", ((TypeReference[])Conversions.unwrapArray(testTypes, TypeReference.class))); } };
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))); }
/** * Returns an inferred class with a predefined <em>direct</em> subtype */ public JvmType findInferredClass(final EObject pattern, final Class<?> clazz) { return this.findInferredClass(pattern, ((Class<?>[])Conversions.unwrapArray(Collections.<Class<?>>unmodifiableSet(CollectionLiterals.<Class<?>>newHashSet(clazz)), Class.class))); }
protected Injector createInjector() { final LinkedList<com.google.inject.Module> modules = CollectionLiterals.<com.google.inject.Module>newLinkedList(); this.collectModules(modules); return Guice.createInjector(AbstractTest.mixin(((com.google.inject.Module[])Conversions.unwrapArray(modules, com.google.inject.Module.class)))); }
protected CompletableFuture<Void> cancel() { final ArrayList<AbstractRequest<?>> localRequests = this.requests; this.requests = CollectionLiterals.<AbstractRequest<?>>newArrayList(); final ArrayList<CompletableFuture<?>> cfs = CollectionLiterals.<CompletableFuture<?>>newArrayList(); for (final AbstractRequest<?> request : localRequests) { { request.cancel(); CompletableFuture<?> _get = request.get(); cfs.add(_get); } } return CompletableFuture.allOf(((CompletableFuture<?>[])Conversions.unwrapArray(cfs, CompletableFuture.class))); }
protected DropwizardAppRule<C> createDropwizardAppRule() { Class<? extends Application<C>> _applicationClass = this.getApplicationClass(); List<ConfigOverride> _createConfiguration = this.createConfiguration(); return new DropwizardAppRule<C>(_applicationClass, null, ((ConfigOverride[])Conversions.unwrapArray(_createConfiguration, ConfigOverride.class))); }
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))); }
JvmTypeReference eraseGenerics(final JvmTypeReference reference) { JvmTypeReference _xifexpression = null; if ((reference instanceof JvmParameterizedTypeReference)) { final Function1<JvmTypeReference, JvmTypeReference> _function = (JvmTypeReference it) -> { return BodyCodeGenerator.this.typeReferences.wildcard(); }; _xifexpression = BodyCodeGenerator.this.typeReferences.typeRef(((JvmParameterizedTypeReference)reference).getType(), ((JvmTypeReference[])Conversions.unwrapArray(ListExtensions.<JvmTypeReference, JvmTypeReference>map(((JvmParameterizedTypeReference)reference).getArguments(), _function), JvmTypeReference.class))); } else { _xifexpression = reference; } return _xifexpression; }
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 TypeReference newSelfTypeReference(final Type typeDeclaration) { TypeReference _xifexpression = null; if ((typeDeclaration instanceof TypeParameterDeclarator)) { final Function1<TypeParameterDeclaration, TypeReference> _function = (TypeParameterDeclaration it) -> { return this.newTypeReference(it); }; _xifexpression = this.newTypeReference(typeDeclaration, ((TypeReference[])Conversions.unwrapArray(IterableExtensions.map(((TypeParameterDeclarator)typeDeclaration).getTypeParameters(), _function), TypeReference.class))); } else { _xifexpression = this.newTypeReference(typeDeclaration); } return _xifexpression; } }
private Iterable<EClassTransitiveInstancesKey> minimizeEClassKeyList(final Iterable<EClassTransitiveInstancesKey> types, final boolean mergeWithSupertypes) { final Function1<EClassTransitiveInstancesKey, EClass> _function = (EClassTransitiveInstancesKey it) -> { return it.getEmfKey(); }; final HashSet<EClass> emfTypes = CollectionLiterals.<EClass>newHashSet(((EClass[])Conversions.unwrapArray(IterableExtensions.<EClassTransitiveInstancesKey, EClass>map(types, _function), EClass.class))); final Function1<EClass, EClassTransitiveInstancesKey> _function_1 = (EClass it) -> { return new EClassTransitiveInstancesKey(it); }; return IterableExtensions.<EClass, EClassTransitiveInstancesKey>map(this.minimizeEClassList(emfTypes, mergeWithSupertypes), _function_1); }
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))); }
protected Object wrapOrUnwrapArray(Object result, LightweightTypeReference expectedType) { if (expectedType.isArray() && !(result instanceof Object[])) { Class<?> arrayType; try { arrayType = getJavaType(expectedType.getComponentType().getType()); return Conversions.unwrapArray(result, arrayType); } catch (ClassNotFoundException e) { return result; } } else if (!expectedType.isArray() && expectedType.isSubtypeOf(Iterable.class)) { return Conversions.doWrapArray(result); } return result; }
protected GuiceBundle<T> createGuiceBundle() { final LinkedList<com.google.inject.Module> modules = CollectionLiterals.<com.google.inject.Module>newLinkedList(); this.collectModules(modules); final GuiceBundle.Builder<T> builder = GuiceBundle.<T>newBuilder(); builder.addModule(DropwizardApplication.mixin(((com.google.inject.Module[])Conversions.unwrapArray(modules, com.google.inject.Module.class)))); builder.setConfigClass(this.getConfigurationClass()); return builder.build(); }
private ThingUID getThingUID(final ModelThing modelThing, final ThingUID parentUID) { if (((parentUID != null) && (modelThing.getId() == null))) { String _bindingId = parentUID.getBindingId(); String _thingTypeId = modelThing.getThingTypeId(); final ThingTypeUID thingTypeUID = new ThingTypeUID(_bindingId, _thingTypeId); String _thingId = modelThing.getThingId(); ArrayList<String> _parentPath = this.getParentPath(parentUID); return new ThingUID(thingTypeUID, _thingId, ((String[])Conversions.unwrapArray(_parentPath, String.class))); } else { return this.constructThingUID(modelThing); } }