Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2019-02-02 12:45:17 +0000
committerStephan Herrmann2019-02-02 12:45:17 +0000
commit3410680207870c7726eaa82fbcdc3e561afe09fb (patch)
treec1ddd5224199aa5c588240c4059d45a91ecb44fd /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
parentf4e22b6a040e70cb20a250ed3473718ccd9ac6c5 (diff)
downloadorg.eclipse.objectteams-3410680207870c7726eaa82fbcdc3e561afe09fb.tar.gz
org.eclipse.objectteams-3410680207870c7726eaa82fbcdc3e561afe09fb.tar.xz
org.eclipse.objectteams-3410680207870c7726eaa82fbcdc3e561afe09fb.zip
update jdt.core to I20190131-0130 for 2019-03 M2
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
index 6f3333c4e..184b9a4b6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -43,6 +43,7 @@
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.lookup;
+import java.util.Arrays;
import java.util.Set;
import org.eclipse.jdt.core.compiler.CharOperation;
@@ -1100,6 +1101,17 @@ public class TypeVariableBinding extends ReferenceBinding {
return this.superclass; // java/lang/Object
}
+ public TypeBinding[] allUpperBounds() {
+ if (this.superclass == null)
+ return this.superInterfaces;
+ if (this.superInterfaces == null || this.superInterfaces.length == 0)
+ return new TypeBinding[] { this.superclass };
+ int nInterfaces = this.superInterfaces.length;
+ TypeBinding[] all = Arrays.copyOf(this.superInterfaces, nInterfaces+1);
+ all[nInterfaces] = this.superclass;
+ return all;
+ }
+
public void evaluateNullAnnotations(Scope scope, TypeParameter parameter) {
long nullTagBits = NullAnnotationMatching.validNullTagBits(this.tagBits);
if (this.firstBound != null && this.firstBound.isValidBinding()) {

Back to the top