Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Jamie Mansfield
asm
Commits
73997f46
Commit
73997f46
authored
Apr 22, 2018
by
mbenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Enhance ClassWriter to take a class loader for use with getCommonSuperClass"
parent
23337ecf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
asm/src/main/java/org/objectweb/asm/ClassWriter.java
asm/src/main/java/org/objectweb/asm/ClassWriter.java
+12
-1
No files found.
asm/src/main/java/org/objectweb/asm/ClassWriter.java
View file @
73997f46
...
...
@@ -849,7 +849,7 @@ public class ClassWriter extends ClassVisitor {
* @return the internal name of the common super class of the two given classes.
*/
protected
String
getCommonSuperClass
(
final
String
type1
,
final
String
type2
)
{
ClassLoader
classLoader
=
getClass
().
getClassLoader
();
ClassLoader
classLoader
=
getClassLoader
();
Class
<?>
class1
;
try
{
class1
=
Class
.
forName
(
type1
.
replace
(
'/'
,
'.'
),
false
,
classLoader
);
...
...
@@ -877,4 +877,15 @@ public class ClassWriter extends ClassVisitor {
return
class1
.
getName
().
replace
(
'.'
,
'/'
);
}
}
/**
* Returns the {@link ClassLoader} to be used by the default implementation of {@link
* #getCommonSuperClass(String, String)}, that of this {@link ClassWriter}'s runtime type by
* default.
*
* @return ClassLoader
*/
protected
ClassLoader
getClassLoader
()
{
return
getClass
().
getClassLoader
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment