replace Java 11 forName() with Module parameter

This commit is contained in:
Volker Berlin 2023-05-01 14:07:47 +02:00
parent 67018ee8e9
commit 57616e2a56
No known key found for this signature in database
GPG Key ID: 988423EF815BE4CB

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 - 2022 Volker Berlin (i-net software)
Copyright 2020 - 2023 Volker Berlin (i-net software)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -205,6 +205,20 @@ class ReplacementForClass<T> {
return forName( name );
}
/**
* Replacement of the Java 9 method forName(Module,String)
*
* @param module
* the module
* @param name
* the fully qualified name of the desired class.
* @return the {@code Class} object for the class with the specified name.
*/
@Replace( "java/lang/Class.forName(Ljava/lang/Module;Ljava/lang/String;)Ljava/lang/Class;" )
public static Class<?> forName( Object module, String name ) {
return null;
}
/**
* Replacement of the Java method newInstance()
*