-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eclipse 4.33 (RC1) JDT Patch for Groovy-Eclipse
- Loading branch information
1 parent
5fe06aa
commit bbeb404
Showing
9 changed files
with
114 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
....compiler.batch/src/org/eclipse/jdt/internal/compiler/apt/model/IntersectionTypeImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Kamil Krzywanski and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Kamil Krzywanski - initial creation if Interesection type and Implementation | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.jdt.internal.compiler.apt.model; | ||
|
||
import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl; | ||
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding; | ||
|
||
import javax.lang.model.type.IntersectionType; | ||
import javax.lang.model.type.TypeKind; | ||
import javax.lang.model.type.TypeMirror; | ||
import javax.lang.model.type.TypeVisitor; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
/** | ||
* Implementation of the WildcardType | ||
*/ | ||
public class IntersectionTypeImpl extends TypeMirrorImpl implements IntersectionType { | ||
private final List<? extends TypeMirror> bounds; | ||
|
||
IntersectionTypeImpl(BaseProcessingEnvImpl env, TypeVariableBinding binding) { | ||
super(env, binding); | ||
this.bounds = Arrays.stream(binding.superInterfaces).map(referenceBinding -> this._env.getFactory().newTypeMirror(referenceBinding)).toList(); | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see javax.lang.model.type.TypeMirror#getKind() | ||
*/ | ||
@Override | ||
public TypeKind getKind() { | ||
return TypeKind.INTERSECTION; | ||
} | ||
/* (non-Javadoc) | ||
* @see javax.lang.model.type.WildcardType#getSuperBound() | ||
*/ | ||
@Override | ||
public <R, P> R accept(TypeVisitor<R, P> v, P p) { | ||
return v.visitIntersection(this, p); | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see javax.lang.model.type.IntersectionType#getBounds() | ||
*/ | ||
@Override | ||
public List<? extends TypeMirror> getBounds() { | ||
return this.bounds; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters