public Boolean apply(final StyleSpecificationProperty e) { Class<? extends StyleSpecificationProperty> _class = e.getClass(); Class<? extends Object>[] _interfaces = _class.getInterfaces(); int _indexOf = ((List<Class<? extends Object>>)Conversions.doWrapArray(_interfaces)).indexOf(type); int _minus = (-1); boolean _greaterThan = (_indexOf > _minus); return Boolean.valueOf(_greaterThan); } };
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)); }
/** * Will be called when the environment can not be derived from a context in {@link #createJavaParser(Object)} * {@link ASTParser#setEnvironment(String[], String[], String[], boolean)} */ protected void provideCustomEnvironment(final ASTParser parser) { final ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader(); final Function1<URL, String> _function = (URL it) -> { return it.getFile(); }; final Function1<String, Boolean> _function_1 = (String it) -> { return Boolean.valueOf(new File(it).exists()); }; final Iterable<String> cpEntries = IterableExtensions.<String>filter(ListExtensions.<URL, String>map(((List<URL>)Conversions.doWrapArray(((URLClassLoader) sysClassLoader).getURLs())), _function), _function_1); parser.setEnvironment(((String[])Conversions.unwrapArray(cpEntries, String.class)), null, null, true); } }
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 void _setValue(final JvmDoubleAnnotationValue it, final int[] value, final String componentType, final boolean mustBeArray) { final Consumer<Integer> _function = (Integer v) -> { EList<Double> _values = it.getValues(); _values.add(Double.valueOf(((double) (v).intValue()))); }; ((List<Integer>)Conversions.doWrapArray(value)).forEach(_function); }
public String printExports() { StringBuilder res = new StringBuilder(); String _get = ((String[])Conversions.unwrapArray(this.exports, String.class))[0]; res.append(_get); for (int i = 1; (i < this.exports.size()); i++) { StringBuilder _append = res.append(","); StringBuilder _append_1 = _append.append("\n "); String _get_1 = ((String[])Conversions.unwrapArray(this.exports, String.class))[i]; _append_1.append(_get_1); } res.append("\n"); return res.toString(); } }
protected void _setValue(final JvmLongAnnotationValue it, final short[] value, final String componentType, final boolean mustBeArray) { final Consumer<Short> _function = (Short v) -> { EList<Long> _values = it.getValues(); _values.add(Long.valueOf(((long) (v).shortValue()))); }; ((List<Short>)Conversions.doWrapArray(value)).forEach(_function); }
public String printExports() { StringBuilder res = new StringBuilder(); String _get = ((String[])Conversions.unwrapArray(this.exports, String.class))[0]; res.append(_get); for (int i = 1; (i < this.exports.size()); i++) { StringBuilder _append = res.append(","); StringBuilder _append_1 = _append.append("\n "); String _get_1 = ((String[])Conversions.unwrapArray(this.exports, String.class))[i]; _append_1.append(_get_1); } res.append("\n"); return res.toString(); } }
protected void suppressWarnings(final IXtextGeneratorFileSystemAccess fsa, final TypeReference... types) { final Consumer<TypeReference> _function = (TypeReference it) -> { this.suppressWarnings(fsa, it); }; ((List<TypeReference>)Conversions.doWrapArray(types)).forEach(_function); }
/** * <!-- 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 Boolean apply(final LoggingTester.LogEntry log) { return Boolean.valueOf(((Objects.equal(level, null) || Objects.equal(log.level, level)) && IterableExtensions.<String>forall(((Iterable<String>)Conversions.doWrapArray(messageParts)), new Function1<String, Boolean>() { @Override public Boolean apply(final String it) { return Boolean.valueOf(log.message.contains(it)); } }))); } };
public void apply(final AnnotationReferenceBuildContext it) { it.setClassValue("value", ((TypeReference[])Conversions.unwrapArray(testTypes, TypeReference.class))); } };
@Override public boolean isPackage(final char[][] parentPackageName, final char[] packageName) { if (((packageName == null) || (packageName.length == 0))) { return false; } return Character.isLowerCase((IterableExtensions.<Character>head(((Iterable<Character>)Conversions.doWrapArray(packageName)))).charValue()); }
@Override public QualifiedName getQualifiedName() { return QualifiedName.create(((String[])Conversions.unwrapArray(ClasspathTypeDescriptor.PACKAGE_AND_NESTED_CLASS_SPLITTER.split(this.name), String.class))); }
protected void _setValue(final JvmFloatAnnotationValue it, final char[] value, final String componentType, final boolean mustBeArray) { final Consumer<Character> _function = (Character v) -> { EList<Float> _values = it.getValues(); _values.add(Float.valueOf(((float) (v).charValue()))); }; ((List<Character>)Conversions.doWrapArray(value)).forEach(_function); }
/** * Unwraps {@code object} to extract the original array if and only if {@code object} was previously created by * {@link #doWrapArray(Object)}. If the array's component type cannot be determined at runtime, {@link Object} is * used. * * @param value * the object to be unwrapped. May be <code>null</code>. * @return the previously wrapped array if the given value represents such. Otherwise returns the value unmodified. * May return <code>null</code> if the value was <code>null</code>. */ @Pure public static Object unwrapArray(Object value) { return unwrapArray(value, Object.class); }
protected void _setValue(final JvmCharAnnotationValue it, final byte[] value, final String componentType, final boolean mustBeArray) { final Consumer<Byte> _function = (Byte v) -> { EList<Character> _values = it.getValues(); _values.add(Character.valueOf(((char) (v).byteValue()))); }; ((List<Byte>)Conversions.doWrapArray(value)).forEach(_function); }
/** * Unwraps {@code object} to extract the original array if and only if {@code object} was previously created by * {@link #doWrapArray(Object)}. If the array's component type cannot be determined at runtime, {@link Object} is * used. * * @param value * the object to be unwrapped. May be <code>null</code>. * @return the previously wrapped array if the given value represents such. Otherwise returns the value unmodified. * May return <code>null</code> if the value was <code>null</code>. */ @Pure public static Object unwrapArray(Object value) { return unwrapArray(value, Object.class); }
protected void _setValue(final JvmDoubleAnnotationValue it, final float[] value, final String componentType, final boolean mustBeArray) { final Consumer<Float> _function = (Float v) -> { EList<Double> _values = it.getValues(); _values.add(Double.valueOf(((double) (v).floatValue()))); }; ((List<Float>)Conversions.doWrapArray(value)).forEach(_function); }
private String getNamespace() { return this.getNamespace(((Object[])Conversions.unwrapArray(this.namespaceComponents, Object.class))); }