org.apache.felix.ipojo.manipulation

## Class ClassLoaderAwareClassWriter

- java.lang.Object
- - org.objectweb.asm.ClassVisitor
  - - org.objectweb.asm.ClassWriter
    - - org.apache.felix.ipojo.manipulation.ClassLoaderAwareClassWriter

    public class ClassLoaderAwareClassWriter
    extends org.objectweb.asm.ClassWriter

An extension of `ClassWriter` that uses a specific classloader to load classes.

### 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

Constructors
Constructor and Description
`ClassLoaderAwareClassWriter(int flags, String className, String superClass, ClassLoader loader)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected String` `getCommonSuperClass(String type1, String type2)` Implements the common super class lookup to be a bit more permissive.

### Methods inherited from class org.objectweb.asm.ClassWriter

`getClassLoader, hasFlags, newClass, newConst, newConstantDynamic, newField, newHandle, newHandle, newInvokeDynamic, newMethod, newMethodType, newModule, newNameType, newPackage, newUTF8, toByteArray, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation`

### Methods inherited from class org.objectweb.asm.ClassVisitor

`getDelegate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ClassLoaderAwareClassWriter

    public ClassLoaderAwareClassWriter(int flags,
                                       String className,
                                       String superClass,
                                       ClassLoader loader)

### Method Detail

#### getCommonSuperClass

    protected final String getCommonSuperClass(String type1,
                                               String type2)

Implements the common super class lookup to be a bit more permissive. First we check is type1 == type2, because in this case, the lookup is done. Then, if one of the class is Object, returns object. If both checks failed, it returns Object.

Overrides:
  `getCommonSuperClass` in class `org.objectweb.asm.ClassWriter`
Parameters:
  `type1` - the first class
  `type2` - the second class
Returns:
  the common super class