org.apache.aries.proxy.impl.common
Class OSGiFriendlyClassWriter

java.lang.Object
  extended by org.objectweb.asm.ClassVisitor
      extended by org.objectweb.asm.ClassWriter
          extended by org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter

public final class OSGiFriendlyClassWriter
extends org.objectweb.asm.ClassWriter

We need to override ASM's default behaviour in getCommonSuperClass(String, String) so that it doesn't load classes (which it was doing on the wrong ClassLoader anyway...)


Field Summary
 
Fields inherited from class org.objectweb.asm.ClassWriter
COMPUTE_FRAMES, COMPUTE_MAXS
 
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv
 
Constructor Summary
OSGiFriendlyClassWriter(org.objectweb.asm.ClassReader arg0, int arg1, ClassLoader loader)
           
OSGiFriendlyClassWriter(int arg0, ClassLoader loader)
           
 
Method Summary
protected  String getCommonSuperClass(String arg0, String arg1)
          We provide an implementation that doesn't cause class loads to occur.
 
Methods inherited from class org.objectweb.asm.ClassWriter
newClass, newConst, newField, newHandle, newInvokeDynamic, newMethod, newMethodType, newNameType, newUTF8, toByteArray, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, visitOuterClass, visitSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiFriendlyClassWriter

public OSGiFriendlyClassWriter(org.objectweb.asm.ClassReader arg0,
                               int arg1,
                               ClassLoader loader)

OSGiFriendlyClassWriter

public OSGiFriendlyClassWriter(int arg0,
                               ClassLoader loader)
Method Detail

getCommonSuperClass

protected final String getCommonSuperClass(String arg0,
                                           String arg1)
We provide an implementation that doesn't cause class loads to occur. It may not be sufficient because it expects to find the common parent using a single classloader, though in fact the common parent may only be loadable by another bundle from which an intermediate class is loaded precondition: arg0 and arg1 are not equal. (checked before this method is called)

Overrides:
getCommonSuperClass in class org.objectweb.asm.ClassWriter


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.