Files
CodeChickenCore/codechicken/lib/asm/CC_ClassWriter.java
T

29 lines
716 B
Java
Raw Normal View History

2013-07-16 17:58:02 +10:00
package codechicken.lib.asm;
import org.objectweb.asm.ClassWriter;
public class CC_ClassWriter extends ClassWriter
{
public CC_ClassWriter(int flags)
{
super(flags);
}
@Override
protected String getCommonSuperClass(String type1, String type2)
{
String c = type1.replace('/', '.');
String d = type2.replace('/', '.');
if(ClassHeirachyManager.classExtends(d, c))
return type1;
if(ClassHeirachyManager.classExtends(c, d))
return type2;
do
{
c = ClassHeirachyManager.getSuperClass(c);
}
while(!ClassHeirachyManager.classExtends(d, c));
return c.replace('.', '/');
}
}