org.eclipse.xtext.util.Triple Java Examples
The following examples show how to use
org.eclipse.xtext.util.Triple.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
@Test public void testMergeMultiType_02() { boolean _isJava11OrLater = AbstractXtendTestCase.isJava11OrLater(); if (_isJava11OrLater) { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("StringBuffer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_4 = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_5 = this.operator_mappedTo(_mappedTo_4, VarianceInfo.OUT); this.to(this.mergeSuccessive(_mappedTo_1, _mappedTo_3, _mappedTo_5), "AbstractStringBuilder & Serializable & Comparable<?>", VarianceInfo.INVARIANT); } else { Pair<String, VarianceInfo> _mappedTo_6 = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_7 = this.operator_mappedTo(_mappedTo_6, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_8 = Pair.<String, VarianceInfo>of("StringBuffer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_9 = this.operator_mappedTo(_mappedTo_8, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_10 = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_11 = this.operator_mappedTo(_mappedTo_10, VarianceInfo.OUT); this.to(this.mergeSuccessive(_mappedTo_7, _mappedTo_9, _mappedTo_11), "AbstractStringBuilder & Serializable", VarianceInfo.INVARIANT); } }
Example #2
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
@Test public void testMergeMultiType_01() { boolean _isJava11OrLater = AbstractXtendTestCase.isJava11OrLater(); if (_isJava11OrLater) { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("StringBuffer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "AbstractStringBuilder & Serializable & Comparable<?>", VarianceInfo.INVARIANT); } else { Pair<String, VarianceInfo> _mappedTo_4 = Pair.<String, VarianceInfo>of("StringBuilder", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_5 = this.operator_mappedTo(_mappedTo_4, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_6 = Pair.<String, VarianceInfo>of("StringBuffer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_7 = this.operator_mappedTo(_mappedTo_6, VarianceInfo.OUT); this.to(this.merge(_mappedTo_5, _mappedTo_7), "AbstractStringBuilder & Serializable", VarianceInfo.INVARIANT); } }
Example #3
Source File: AbstractSCTResource.java From statecharts with Eclipse Public License 1.0 | 6 votes |
@Override public EObject getEObject(String uriFragment) { if (encoder.isCrossLinkFragment(this, uriFragment)) { Triple<EObject, EReference, INode> triple = encoder.decode(this, uriFragment); List<EObject> linkedObjects = null; linkedObjects = linkingService.getLinkedObjects(triple.getFirst(), triple.getSecond(), triple.getThird()); if (!linkedObjects.isEmpty()) { return linkedObjects.get(0); } else { createDiagnostic(triple); return null; } } if (uriFragment != null && uriFragment.startsWith(SCT_PREFIX)) { return super.getEObject(uriFragment.substring(SCT_PREFIX.length())); } return super.getEObject(uriFragment); }
Example #4
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
@Test public void testBug470766_01() { boolean _isJava12OrLater = AbstractXtendTestCase.isJava12OrLater(); if (_isJava12OrLater) { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("void", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("Integer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_4 = Pair.<String, VarianceInfo>of("Long", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_5 = this.operator_mappedTo(_mappedTo_4, VarianceInfo.INVARIANT); this.to(this.merge(_mappedTo_1, _mappedTo_3, _mappedTo_5), "Number & Comparable<?> & Constable & ConstantDesc", VarianceInfo.INVARIANT); } else { Pair<String, VarianceInfo> _mappedTo_6 = Pair.<String, VarianceInfo>of("void", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_7 = this.operator_mappedTo(_mappedTo_6, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_8 = Pair.<String, VarianceInfo>of("Integer", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_9 = this.operator_mappedTo(_mappedTo_8, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_10 = Pair.<String, VarianceInfo>of("Long", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_11 = this.operator_mappedTo(_mappedTo_10, VarianceInfo.INVARIANT); this.to(this.merge(_mappedTo_7, _mappedTo_9, _mappedTo_11), "Number & Comparable<?>", VarianceInfo.INVARIANT); } }
Example #5
Source File: BatchLinkableResource.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
@Override protected EObject handleCyclicResolution(Triple<EObject, EReference, INode> triple) throws AssertionError { if (!isValidationDisabled()) { EObject context = triple.getFirst(); if (context.eClass() == TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE) { // here we may end up with cyclic resolution requests in rare situations, e.g. for input types // like : /* * package p; * class C extends p.C.Bogus {} */ return null; } DiagnosticMessage message = new DiagnosticMessage("Cyclic linking detected : " + getReferences(triple, resolving), Severity.ERROR, "cyclic-resolution"); List<Diagnostic> list = getDiagnosticList(message); Diagnostic diagnostic = createDiagnostic(triple, message); if (!list.contains(diagnostic)) list.add(diagnostic); } return null; }
Example #6
Source File: ErrorTreeAppendable.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
@Override public TreeAppendable append(JvmType type) { if(type.eIsProxy()) { String fragment = ((InternalEObject)type).eProxyURI().fragment(); Triple<EObject, EReference, INode> unresolvedLink = encoder.decode(getState().getResource(), fragment); if(unresolvedLink != null) { INode linkNode = unresolvedLink.getThird(); if(linkNode != null) { append(NodeModelUtils.getTokenText(linkNode)); return this; } } append("unresolved type"); return this; } return super.append(type); }
Example #7
Source File: TestErrorAcceptor.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
private boolean compareTriple(Triple<TransformationErrorCode, String, EObject> one, Triple<TransformationErrorCode, String, EObject> other) { if (one.equals(other)) return true; if (other == null) return false; if (other == one) return true; TransformationErrorCode first = one.getFirst(); boolean isFirstEqual = ((first == null) ? other.getFirst() == null : first.equals(other.getFirst())); if (!isFirstEqual) return false; String second = one.getSecond(); boolean isSecondEqual = second == ANY_STRING || ((second == null) ? other.getSecond() == null : second.equals(other.getSecond())); if (!isSecondEqual) return false; EObject third = one.getThird(); boolean isThirdEqual = third == ANY_EOBJECT || (third == null ? other.getThird() == null : one.getThird().equals(other.getThird())); return isThirdEqual; }
Example #8
Source File: AbstractTypeProvider.java From dsl-devkit with Eclipse Public License 1.0 | 6 votes |
/** * Gets the containing info for an expression. * <p> * The containing info for an expression consists of * <ul> * <li>the EObject that contains the expression, * <li>the containment EReference of that containing EObject * <li>if the multiplicity is > 1, the index of the expression in the containing EReference; else -1 * </ul> * * @param expression * the expression to get the containing info for * @return the containing info for {@code expression} */ protected Triple<EObject, EReference, Integer> getContainingInfo(final IExpression expression) { if (expression == null) { return null; } if (expression.eIsProxy()) { return null; } EReference containmentReference = expression.eContainmentFeature(); if (containmentReference == null) { return null; } EObject container = expression.eContainer(); int index = (containmentReference.isMany()) ? ((List<?>) container.eGet(containmentReference)).indexOf(expression) : -1; return Tuples.create(container, containmentReference, index); }
Example #9
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testCircularTypeParams_13() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T extends T2, T2 extends T", "T2", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _assertMapping = this.assertMapping(_mappedBy, "T", _mappedTo_1); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.assertMapping(_assertMapping, "T2", _mappedTo_3); }
Example #10
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testInheritanceMapping_02() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("C", "Comparable<C>", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); this.assertMapping(_mappedBy, "C", _mappedTo_1); }
Example #11
Source File: AbstractXtextInspectorTest.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void acceptInfo(String message, EObject object, EStructuralFeature feature, int index, String code, String... issueData) { if (!isExpectingInfos()) fail("unexpected call to acceptInfo"); Triple<String,EObject,EStructuralFeature> warning = Tuples.create(message, object, feature); infos.add(warning); }
Example #12
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_04_e() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #13
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_02_i() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.IN); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.IN); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #14
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testUpperBound_09() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T", "Iterable<? extends Iterable<T>>", "Iterable<? extends Iterable<CharSequence>>"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("CharSequence", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); this.assertMapping(_mappedBy, "T", _mappedTo_1); }
Example #15
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_06_h() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.IN); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #16
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testDependentTypeParams_02() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T, T2 extends T", "Iterable<T>", "Iterable<String>"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _assertMapping = this.assertMapping(_mappedBy, "T", _mappedTo_1); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); this.assertMapping(_assertMapping, "T2", _mappedTo_3); }
Example #17
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testUpperBound_03() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T", "Iterable<? extends T>", "Iterable<? super String>"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("Object", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.IN); this.assertOrigins(this.assertMapping(_mappedBy, "T", _mappedTo_1, _mappedTo_3), "T", 1); }
Example #18
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_02_c() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.IN); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", VarianceInfo.IN); }
Example #19
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_04_f() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.IN); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #20
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_02_b() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #21
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_02_a() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", VarianceInfo.INVARIANT); }
Example #22
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testCircularTypeParams_08() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T extends org.eclipse.xtend.core.tests.typesystem.CharIterable<T>", "CharSequence", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("CharIterable<CharSequence>", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); this.assertMapping(_mappedBy, "T", _mappedTo_1); }
Example #23
Source File: LazyLinkingResource.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.3 */ protected void createAndAddDiagnostic(Triple<EObject, EReference, INode> triple, IllegalNodeException ex) { if (isValidationDisabled()) return; ILinkingDiagnosticMessageProvider.ILinkingDiagnosticContext context = createDiagnosticMessageContext(triple); DiagnosticMessage message = linkingDiagnosticMessageProvider.getIllegalNodeMessage(context, ex); if (message != null) { List<Diagnostic> list = getDiagnosticList(message); Diagnostic diagnostic = createDiagnostic(triple, message); if (!list.contains(diagnostic)) list.add(diagnostic); } }
Example #24
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testUnambiguousMapping_03() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("K, V", "java.util.Map<K, V>", "java.util.Map<String, Integer>"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _assertMapping = this.assertMapping(_mappedBy, "K", _mappedTo_1); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("Integer", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.INVARIANT); this.assertMapping(_assertMapping, "V", _mappedTo_3); }
Example #25
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testCircularTypeParams_09() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T extends org.eclipse.xtend.core.tests.typesystem.CharIterable<? extends T>", "CharSequence", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("CharIterable<? extends CharSequence>", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); this.assertMapping(_mappedBy, "T", _mappedTo_1); }
Example #26
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_01_e() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #27
Source File: BoundTypeArgumentMergerTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testArgumentTypeUsedTwice_01_d() { Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.INVARIANT); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("String", VarianceInfo.INVARIANT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.to(this.merge(_mappedTo_1, _mappedTo_3), "String", null); }
Example #28
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testUnusedParams_05() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T extends T2, T2 extends CharSequence", "CharSequence", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("Object", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _assertMapping = this.assertMapping(_mappedBy, "T", _mappedTo_1); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("CharSequence", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.assertMapping(_assertMapping, "T2", _mappedTo_3); }
Example #29
Source File: TestErrorAcceptor.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void acceptError(TransformationErrorCode errorCode, String message, EObject element) { Triple<TransformationErrorCode, String, EObject> create = Tuples.create(errorCode, message, element); // System.out.println((write ? "Write>" : "Read>") + " errorCode: " + (errorCode != null ? errorCode : "") // + ", message: " + (message != null ? message : "") + ", element: " + (element != null ? element : "")); if (write) { flugschreiber.push(create); } else { Triple<TransformationErrorCode, String, EObject> pop = flugschreiber.removeLast(); assertNotNull("Queue is empty", pop); boolean equals = compareTriple(pop, create); assertTrue("Verified", equals); } }
Example #30
Source File: ActualTypeArgumentCollectorTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Test public void testCircularTypeParams_10() { Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _mappedBy = this.mappedBy("T extends Iterable<T>, T2 extends Iterable<T>", "CharSequence", "String"); Pair<String, VarianceInfo> _mappedTo = Pair.<String, VarianceInfo>of("Iterable<Object>", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_1 = this.operator_mappedTo(_mappedTo, VarianceInfo.OUT); Map<JvmTypeParameter, List<LightweightBoundTypeArgument>> _assertMapping = this.assertMapping(_mappedBy, "T", _mappedTo_1); Pair<String, VarianceInfo> _mappedTo_2 = Pair.<String, VarianceInfo>of("Iterable<Iterable<Object>>", VarianceInfo.OUT); Triple<String, VarianceInfo, VarianceInfo> _mappedTo_3 = this.operator_mappedTo(_mappedTo_2, VarianceInfo.OUT); this.assertMapping(_assertMapping, "T2", _mappedTo_3); }