protected ClassWriter buildClassHeader(ClassLoader classLoader,
                                           ClassDefinition classDef) {
        boolean reactive = classDef.isReactive();

        String[] original = classDef.getInterfaces();
        int interfacesNr = original.length + (reactive ? 2 : 1);
        String[] interfaces = new String[interfacesNr];
        for ( int i = 0; i < original.length; i++ ) {
            interfaces[i] = BuildUtils.getInternalType( original[i] );
        }
        interfaces[original.length] = BuildUtils.getInternalType( GeneratedFact.class.getName() );
        if (reactive) {
            interfaces[original.length+1] = BuildUtils.getInternalType( ReactiveObject.class.getName() );
        }

        int classModifiers = Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER;
        if ( classDef.isAbstrakt() ) {
            classModifiers += Opcodes.ACC_ABSTRACT;
        }

        ClassWriter cw = createClassWriter( classLoader,
                                            classModifiers,
                                            BuildUtils.getInternalType( classDef.getClassName() ),
                                            null,
                                            BuildUtils.getInternalType( classDef.getSuperClass() ),
                                            interfaces );

        buildClassAnnotations(classDef, cw);

        cw.visitSource( classDef.getClassName() + ".java",
                        null );

        return cw;
    }
protected ClassWriter buildClassHeader ( ClassLoader classLoader , ClassDefinition classDef ) { boolean reactive = classDef . isReactive ( ) ; String [ ] original = classDef . getInterfaces ( ) ; int interfacesNr = original . length + ( reactive ? 2 : 1 ) ; String [ ] interfaces = new String [ interfacesNr ] ; for ( int i = 0 ; i < original . length ; i ++ ) { interfaces [ i ] = BuildUtils . getInternalType ( original [ i ] ) ; } interfaces [ original . length ] = BuildUtils . getInternalType ( GeneratedFact . class . getName ( ) ) ; if ( reactive ) { interfaces [ original . length + 1 ] = BuildUtils . getInternalType ( ReactiveObject . class . getName ( ) ) ; } int classModifiers = Opcodes . ACC_PUBLIC + Opcodes . ACC_SUPER ; if ( classDef . isAbstrakt ( ) ) { classModifiers += Opcodes . ACC_ABSTRACT ; } ClassWriter cw = createClassWriter ( classLoader , classModifiers , BuildUtils . getInternalType ( classDef . getClassName ( ) ) , null , BuildUtils . getInternalType ( classDef . getSuperClass ( ) ) , interfaces ) ; buildClassAnnotations ( classDef , cw ) ; cw . visitSource ( classDef . getClassName ( ) + ".java" , null ) ; return cw ; }
Defines the class header for the given class definition