Skip to content

Commit 658a78a

Browse files
authored
Merge pull request #1081 from mrglavas/1080#test-imposter-classes
Create java.lang and java.math imposter classes for use in testing qualified names.
2 parents cc044cc + c17a0b5 commit 658a78a

File tree

12 files changed

+450
-0
lines changed

12 files changed

+450
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
import java.io.Serializable;
14+
15+
/**
16+
* This class can be used in testing to impersonate java.lang.Boolean in order to
17+
* verify that qualified class names are processed correctly. It is not intended to
18+
* be complete or functional.
19+
*/
20+
public class Boolean implements Serializable, Comparable<Boolean> {
21+
22+
@Override
23+
public int compareTo(Boolean o) {
24+
return 0;
25+
}
26+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Byte in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Byte extends Number implements Comparable<Byte> {
19+
20+
@Override
21+
public int compareTo(Byte o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.CharSequence in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public interface CharSequence {
19+
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
import java.io.Serializable;
14+
15+
/**
16+
* This class can be used in testing to impersonate java.lang.Character in order to
17+
* verify that qualified class names are processed correctly. It is not intended to
18+
* be complete or functional.
19+
*/
20+
public class Character implements Serializable, Comparable<Character> {
21+
22+
@Override
23+
public int compareTo(Character o) {
24+
return 0;
25+
}
26+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Double in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Double extends Number implements Comparable<Double> {
19+
20+
@Override
21+
public int compareTo(Double o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Float in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Float extends Number implements Comparable<Float> {
19+
20+
@Override
21+
public int compareTo(Float o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Integer in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Integer extends Number implements Comparable<Integer> {
19+
20+
@Override
21+
public int compareTo(Integer o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Long in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Long extends Number implements Comparable<Long> {
19+
20+
@Override
21+
public int compareTo(Long o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
/**
14+
* This class can be used in testing to impersonate java.lang.Short in order to
15+
* verify that qualified class names are processed correctly. It is not intended to
16+
* be complete or functional.
17+
*/
18+
public class Short extends Number implements Comparable<Short> {
19+
20+
@Override
21+
public int compareTo(Short o) {
22+
return 0;
23+
}
24+
25+
@Override
26+
public int intValue() {
27+
return 0;
28+
}
29+
30+
@Override
31+
public long longValue() {
32+
return 0;
33+
}
34+
35+
@Override
36+
public float floatValue() {
37+
return 0;
38+
}
39+
40+
@Override
41+
public double doubleValue() {
42+
return 0;
43+
}
44+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2024 IBM Corporation.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*******************************************************************************/
10+
11+
package ng;
12+
13+
import java.io.Serializable;
14+
15+
/**
16+
* This class can be used in testing to impersonate java.lang.String in order to
17+
* verify that qualified class names are processed correctly. It is not intended to
18+
* be complete or functional.
19+
*/
20+
public class String implements Serializable, Comparable<String>, CharSequence {
21+
22+
@Override
23+
public int compareTo(String o) {
24+
return 0;
25+
}
26+
}

0 commit comments

Comments
 (0)