Skip to content

Commit

Permalink
Add tests and framework changes for code assist and DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
jarthana committed Nov 15, 2023
1 parent 1ebf4c3 commit 5021fdb
Show file tree
Hide file tree
Showing 69 changed files with 1,630 additions and 9 deletions.
14 changes: 14 additions & 0 deletions JCL/converterJclMin21/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
3 changes: 3 additions & 0 deletions JCL/converterJclMin21/src/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Created-By: 1.8.0_151 (Oracle Corporation)

5 changes: 5 additions & 0 deletions JCL/converterJclMin21/src/java/io/InputStream.java
@@ -0,0 +1,5 @@
package java.io;

public class InputStream {

}
8 changes: 8 additions & 0 deletions JCL/converterJclMin21/src/java/io/PrintStream.java
@@ -0,0 +1,8 @@
package java.io;

public class PrintStream {
public void println(String x) {
}
public void println(int x) {
}
}
4 changes: 4 additions & 0 deletions JCL/converterJclMin21/src/java/io/Serializable.java
@@ -0,0 +1,4 @@
package java.io;

public interface Serializable {
}
5 changes: 5 additions & 0 deletions JCL/converterJclMin21/src/java/lang/CharSequence.java
@@ -0,0 +1,5 @@
package java.lang;

public interface CharSequence {
int length();
}
4 changes: 4 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Class.java
@@ -0,0 +1,4 @@
package java.lang;

public class Class<T> {
}
20 changes: 20 additions & 0 deletions JCL/converterJclMin21/src/java/lang/ClassNotFoundException.java
@@ -0,0 +1,20 @@
package java.lang;

public class ClassNotFoundException extends ReflectiveOperationException {

public ClassNotFoundException() {
super((Throwable)null); // Disallow initCause
}

public ClassNotFoundException(String s) {
super(s, null); // Disallow initCause
}

public ClassNotFoundException(String s, Throwable ex) {
super(s, ex); // Disallow initCause
}

public Throwable getException() {
return getCause();
}
}
@@ -0,0 +1,4 @@
package java.lang;

public class CloneNotSupportedException extends Exception {
}
4 changes: 4 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Comparable.java
@@ -0,0 +1,4 @@
package java.lang;

public interface Comparable<T> {
}
6 changes: 6 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Deprecated.java
@@ -0,0 +1,6 @@
package java.lang;
import java.lang.annotation.*;
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface Deprecated {
}
18 changes: 18 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Enum.java
@@ -0,0 +1,18 @@
package java.lang;

public abstract class Enum<T extends Enum<T>> implements Comparable<T>, java.io.Serializable {
private static final long serialVersionUID = 2L;

protected Enum(String name, int ordinal) {
}
public final String name() {
return null;
}
public final int ordinal() {
return 0;
}
public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
String name) {
return null;
}
}
16 changes: 16 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Error.java
@@ -0,0 +1,16 @@
package java.lang;

public class Error extends Throwable {

public Error(java.lang.String s) {
// TODO Auto-generated constructor stub
}

public Error(java.lang.String s, java.lang.Throwable cause) {
// TODO Auto-generated constructor stub
}

public Error() {
// TODO Auto-generated constructor stub
}
}
19 changes: 19 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Exception.java
@@ -0,0 +1,19 @@
package java.lang;

public class Exception extends Throwable {
public Exception() {
super();
}

public Exception(String message) {
super(message);
}

public Exception(String message, Throwable cause) {
super(message, cause);
}

public Exception(Throwable cause) {
super(cause);
}
}
@@ -0,0 +1,5 @@
package java.lang;

public class IllegalAccessException extends RuntimeException {

}
@@ -0,0 +1,4 @@
package java.lang;

public class IllegalMonitorStateException extends RuntimeException {
}
@@ -0,0 +1,13 @@

package java.lang;
public
class IncompatibleClassChangeError extends LinkageError {

public IncompatibleClassChangeError () {
super();
}

public IncompatibleClassChangeError(String s) {
super(s);
}
}
59 changes: 59 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Integer.java
@@ -0,0 +1,59 @@
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package java.lang;

public class Integer extends Number implements Comparable<Integer> {
private static final long serialVersionUID = 6462609062775655000L;

public Integer(int i) {
}
public Integer(String s) {
}
public static final int MAX_VALUE= 2147483647;
public static final int MIN_VALUE= -2147483647;

public static int parseInt(String s) {
return 0;
}
public static String toHexString(int i) {
return null;
}
public static String toString(int i) {
return null;
}
/* (non-Javadoc)
* @see java.lang.Number#doubleValue()
*/
public double doubleValue() {
return 0;
}
/* (non-Javadoc)
* @see java.lang.Number#floatValue()
*/
public float floatValue() {
return 0;
}
/* (non-Javadoc)
* @see java.lang.Number#intValue()
*/
public int intValue() {
return 0;
}
/* (non-Javadoc)
* @see java.lang.Number#longValue()
*/
public long longValue() {
return 0;
}
public int compareTo(Integer i) {
return 0;
}
}
4 changes: 4 additions & 0 deletions JCL/converterJclMin21/src/java/lang/InterruptedException.java
@@ -0,0 +1,4 @@
package java.lang;

public class InterruptedException extends Exception {
}
10 changes: 10 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Iterable.java
@@ -0,0 +1,10 @@
package java.lang;

import java.util.Iterator;
import java.util.function.Consumer;

public interface Iterable<T> {
Iterator<T> iterator();
default void forEach(Consumer<? super T> action) {
}
}
17 changes: 17 additions & 0 deletions JCL/converterJclMin21/src/java/lang/LinkageError.java
@@ -0,0 +1,17 @@
package java.lang;

public
class LinkageError extends Error {

public LinkageError() {
super();
}

public LinkageError(String s) {
super(s);
}

public LinkageError(String s, Throwable cause) {
super(s, cause);
}
}
13 changes: 13 additions & 0 deletions JCL/converterJclMin21/src/java/lang/NoClassDefFoundError.java
@@ -0,0 +1,13 @@
package java.lang;

public
class NoClassDefFoundError extends LinkageError {

public NoClassDefFoundError() {
super();
}

public NoClassDefFoundError(String s) {
super(s);
}
}
13 changes: 13 additions & 0 deletions JCL/converterJclMin21/src/java/lang/NoSuchFieldError.java
@@ -0,0 +1,13 @@
package java.lang;

public
class NoSuchFieldError extends IncompatibleClassChangeError {

public NoSuchFieldError() {
super();
}

public NoSuchFieldError(String s) {
super(s);
}
}
@@ -0,0 +1,5 @@
package java.lang;

public class NoSuchMethodException extends RuntimeException {

}
11 changes: 11 additions & 0 deletions JCL/converterJclMin21/src/java/lang/NullPointerException.java
@@ -0,0 +1,11 @@
package java.lang;
public
class NullPointerException extends RuntimeException {
public NullPointerException() {
super();
}

public NullPointerException(String s) {
super(s);
}
}
29 changes: 29 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Number.java
@@ -0,0 +1,29 @@
/*
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

package java.lang;

public abstract class Number implements java.io.Serializable {
}
34 changes: 34 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Object.java
@@ -0,0 +1,34 @@
package java.lang;

public class Object {

public Object() {
}
protected Object clone() throws CloneNotSupportedException {
return null;
}
public boolean equals (Object obj) {
return false;
}
protected void finalize () throws Throwable {
}
public final Class<? extends Object> getClass() {
return null;
}
public int hashCode() {
return -1;
}
public final void notify() throws IllegalMonitorStateException {
}
public final void notifyAll() throws IllegalMonitorStateException {
}
public String toString () {
return null;
}
public final void wait () throws IllegalMonitorStateException, InterruptedException {
}
public final void wait (long millis) throws IllegalMonitorStateException, InterruptedException {
}
public final void wait (long millis, int nanos) throws IllegalMonitorStateException, InterruptedException {
}
}
7 changes: 7 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Override.java
@@ -0,0 +1,7 @@
package java.lang;

import java.lang.annotation.*;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}
9 changes: 9 additions & 0 deletions JCL/converterJclMin21/src/java/lang/Record.java
@@ -0,0 +1,9 @@
package java.lang;
public abstract class Record {
@Override
public abstract boolean equals(Object obj);
@Override
public abstract int hashCode();
@Override
public abstract String toString();
}

0 comments on commit 5021fdb

Please sign in to comment.