-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
169 additions
and
73 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
21 changes: 21 additions & 0 deletions
21
org.eclipse.xtend.core.tests/testdata/testdata/stubs/StubbedAbstractList.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,21 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lorenzo Bettini and others. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package testdata.stubs; | ||
|
||
import java.util.AbstractCollection; | ||
|
||
/** | ||
* A stub type to use instead of relying on Java API like AbstractList, whose methods and supertypes might change in newer versions (see, | ||
* e.g., https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html). | ||
* | ||
* @author Lorenzo Bettini - Initial contribution and API | ||
*/ | ||
public abstract class StubbedAbstractList<E> extends AbstractCollection<E> implements StubbedList<E> { | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
org.eclipse.xtend.core.tests/testdata/testdata/stubs/StubbedArrayList.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,34 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lorenzo Bettini and others. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package testdata.stubs; | ||
|
||
import java.util.Iterator; | ||
import java.util.RandomAccess; | ||
|
||
/** | ||
* A stub type to use instead of relying on Java API like AbstractList, whose methods and supertypes might change in newer versions (see, | ||
* e.g., https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html). | ||
* | ||
* @author Lorenzo Bettini - Initial contribution and API | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class StubbedArrayList<E> extends StubbedAbstractList<E> | ||
implements RandomAccess, Cloneable, java.io.Serializable { | ||
|
||
@Override | ||
public Iterator<E> iterator() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int size() { | ||
return 0; | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
org.eclipse.xtend.core.tests/testdata/testdata/stubs/StubbedList.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,21 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lorenzo Bettini and others. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package testdata.stubs; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* A stub type to use instead of relying on Java API like AbstractList, whose methods and supertypes might change in newer versions (see, | ||
* e.g., https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html). | ||
* | ||
* @author Lorenzo Bettini - Initial contribution and API | ||
*/ | ||
public interface StubbedList<E> extends Collection<E> { | ||
|
||
} |
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