Skip to content

Commit 914c717

Browse files
committed
more replacement API
1 parent 7105e57 commit 914c717

File tree

5 files changed

+175
-0
lines changed

5 files changed

+175
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2022 Volker Berlin (i-net software)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package de.inetsoftware.jwebassembly.api.java.net;
17+
18+
import de.inetsoftware.jwebassembly.api.annotation.Replace;
19+
20+
/**
21+
* Replacement methods for the class java.net.Inet4Address.
22+
*
23+
* @author Volker Berlin
24+
*/
25+
public class ReplacementForInet4Address {
26+
27+
/**
28+
* Replacement for static code.
29+
*/
30+
@Replace( "java/net/Inet4Address.<clinit>()V" )
31+
private static void _init() {
32+
// nothing
33+
}
34+
35+
/**
36+
* Replacement for Inet4Address.init()
37+
*/
38+
@Replace( "java/net/Inet4Address.init()V" )
39+
private static void init() {
40+
// nothing
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2022 Volker Berlin (i-net software)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package de.inetsoftware.jwebassembly.api.java.net;
17+
18+
import de.inetsoftware.jwebassembly.api.annotation.Replace;
19+
20+
/**
21+
* Replacement methods for the class java.net.Inet6Address.
22+
*
23+
* @author Volker Berlin
24+
*/
25+
public class ReplacementForInet6Address {
26+
27+
/**
28+
* Replacement for static code.
29+
*/
30+
@Replace( "java/net/Inet6Address.<clinit>()V" )
31+
private static void _init() {
32+
// nothing
33+
}
34+
35+
/**
36+
* Replacement for Inet6Address.init()
37+
*/
38+
@Replace( "java/net/Inet6Address.init()V" )
39+
private static void init() {
40+
// nothing
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2022 Volker Berlin (i-net software)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package de.inetsoftware.jwebassembly.api.java.net;
17+
18+
import de.inetsoftware.jwebassembly.api.annotation.Replace;
19+
20+
/**
21+
* Replacement methods for the class java.net.InetAddress.
22+
*
23+
* @author Volker Berlin
24+
*/
25+
public class ReplacementForInetAddress {
26+
27+
/**
28+
* Replacement for static code.
29+
*/
30+
@Replace( "java/net/InetAddress.<clinit>()V" )
31+
private static void _init() {
32+
// nothing
33+
}
34+
35+
/**
36+
* Replacement for InetAddress.init()
37+
*/
38+
@Replace( "java/net/InetAddress.init()V" )
39+
private static void init() {
40+
// nothing
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2022 Volker Berlin (i-net software)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package de.inetsoftware.jwebassembly.api.java.net;
17+
18+
import de.inetsoftware.jwebassembly.api.annotation.Replace;
19+
20+
/**
21+
* Replacement methods for the class java.net.NetworkInterface.
22+
*
23+
* @author Volker Berlin
24+
*/
25+
public class ReplacementForNetworkInterface {
26+
27+
/**
28+
* Replacement for static code.
29+
*/
30+
@Replace( "java/net/NetworkInterface.<clinit>()V" )
31+
private static void _init() {
32+
// nothing
33+
}
34+
35+
/**
36+
* Replacement for NetworkInterface.init()
37+
*/
38+
@Replace( "java/net/NetworkInterface.init()V" )
39+
private static void init() {
40+
// nothing
41+
}
42+
}

src/de/inetsoftware/jwebassembly/api/java/util/concurrent/ReplacementForConcurrentHashMap.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@
2929
@Replace( "java/util/concurrent/ConcurrentHashMap" )
3030
public class ReplacementForConcurrentHashMap<K,V> extends HashMap<K, V> implements ConcurrentMap<K,V> {
3131

32+
public ReplacementForConcurrentHashMap() {
33+
//nothing
34+
}
35+
36+
public ReplacementForConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) {
37+
super( initialCapacity, loadFactor );
38+
}
3239
}

0 commit comments

Comments
 (0)