jodd-proxetta/src/main/java/jodd/proxetta/asm/ProxettaWrapperClassBuilder.java
@Override
	public void visit(final int version, int access, final String name, final String signature, final String superName, String[] interfaces) {

		wd.init(name, superName, this.suffix, this.reqProxyClassName);

		// no superclass
		wd.superName = AsmUtil.SIGNATURE_JAVA_LANG_OBJECT;

		// change access of destination
		access &= ~AsmUtil.ACC_ABSTRACT;
		access &= ~AsmUtil.ACC_INTERFACE;

		// write destination class
		if (targetClassOrInterface.isInterface()) {
			// target is interface
			wd.wrapInterface = true;

			interfaces = new String[] {targetClassOrInterface.getName().replace('.', '/')};
		} else {
			// target is class
			wd.wrapInterface = false;

			if (targetInterface != null) {
				// interface provided
				interfaces = new String[] {targetInterface.getName().replace('.', '/')};
			} else {
				// no interface provided, use all
				//interfaces = null;
			}
		}
		final int v = ProxettaAsmUtil.resolveJavaVersion(version);
		wd.dest.visit(v, access, wd.thisReference, signature, wd.superName, interfaces);

		wd.proxyAspects = new ProxyAspectData[aspects.length];
		for (int i = 0; i < aspects.length; i++) {
			wd.proxyAspects[i] = new ProxyAspectData(wd, aspects[i], i);
		}

		// create new field wrapper field and store it's reference into work-data
		wd.wrapperRef = targetFieldName;
		wd.wrapperType = 'L' + name + ';';


		if (createTargetInDefaultCtor) {
			// create private, final field
			final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PRIVATE | AsmUtil.ACC_FINAL, wd.wrapperRef, wd.wrapperType, null, null);
			fv.visitEnd();

			createEmptyCtorThatCreatesTarget();
		}
		else {
			// create public, non-final field
			final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PUBLIC, wd.wrapperRef, wd.wrapperType, null, null);
			fv.visitEnd();

			createEmptyCtor();
		}
	}
@Override
	public void visit(final int version, int access, final String name, final String signature, final String superName, String[] interfaces) {

		wd.init(name, superName, this.suffix, this.reqProxyClassName);

		// no superclass
		wd.superName = AsmUtil.SIGNATURE_JAVA_LANG_OBJECT;

		// change access of destination
		access &= ~AsmUtil.ACC_ABSTRACT;
		access &= ~AsmUtil.ACC_INTERFACE;

		// write destination class
		if (targetClassOrInterface.isInterface()) {
			// target is interface
			wd.wrapInterface = true;

			interfaces = new String[] {targetClassOrInterface.getName().replace('.', '/')};
		} else {
			// target is class
			wd.wrapInterface = false;

			if (targetInterface != null) {
				// interface provided
				interfaces = new String[] {targetInterface.getName().replace('.', '/')};
			} else {
				// no interface provided, use all
				//interfaces = null;
			}
		}
		final int v = ProxettaAsmUtil.resolveJavaVersion(version);
		wd.dest.visit(v, access, wd.thisReference, signature, wd.superName, interfaces);

		wd.proxyAspects = new ProxyAspectData[aspects.length];
		for (int i = 0; i < aspects.length; i++) {
			wd.proxyAspects[i] = new ProxyAspectData(wd, aspects[i], i);
		}

		// create new field wrapper field and store it's reference into work-data
		wd.wrapperRef = targetFieldName;
		wd.wrapperType = 'L' + name + ';';


		if (createTargetInDefaultCtor) {
			// create private, final field
			final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PRIVATE | AsmUtil.ACC_FINAL, wd.wrapperRef, wd.wrapperType, null, null);
			fv.visitEnd();

			createEmptyCtorThatCreatesTarget();
		}
		else {
			// create public, non-final field
			final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PUBLIC, wd.wrapperRef, wd.wrapperType, null, null);
			fv.visitEnd();

			createEmptyCtor();
		}
	}
@ Override public void visit ( final int version , int access , final String name , final String signature , final String superName , String [ ] interfaces ) { wd . init ( name , superName , this . suffix , this . reqProxyClassName ) ; // no superclass wd . superName = AsmUtil . SIGNATURE_JAVA_LANG_OBJECT ; // change access of destination access &= ~ AsmUtil . ACC_ABSTRACT ; access &= ~ AsmUtil . ACC_INTERFACE ; // write destination class if ( targetClassOrInterface . isInterface ( ) ) { // target is interface wd . wrapInterface = true ; interfaces = new String [ ] { targetClassOrInterface . getName ( ) . replace ( ' ' , ' ' ) } ; } else { // target is class wd . wrapInterface = false ; if ( targetInterface != null ) { // interface provided interfaces = new String [ ] { targetInterface . getName ( ) . replace ( ' ' , ' ' ) } ; } else { // no interface provided, use all //interfaces = null; } } final int v = ProxettaAsmUtil . resolveJavaVersion ( version ) ; wd . dest . visit ( v , access , wd . thisReference , signature , wd . superName , interfaces ) ; wd . proxyAspects = new ProxyAspectData [ aspects . length ] ; for ( int i = 0 ; i < aspects . length ; i ++ ) { wd . proxyAspects [ i ] = new ProxyAspectData ( wd , aspects [ i ] , i ) ; } // create new field wrapper field and store it's reference into work-data wd . wrapperRef = targetFieldName ; wd . wrapperType = ' ' + name + ' ' ; if ( createTargetInDefaultCtor ) { // create private, final field final FieldVisitor fv = wd . dest . visitField ( AsmUtil . ACC_PRIVATE | AsmUtil . ACC_FINAL , wd . wrapperRef , wd . wrapperType , null , null ) ; fv . visitEnd ( ) ; createEmptyCtorThatCreatesTarget ( ) ; } else { // create public, non-final field final FieldVisitor fv = wd . dest . visitField ( AsmUtil . ACC_PUBLIC , wd . wrapperRef , wd . wrapperType , null , null ) ; fv . visitEnd ( ) ; createEmptyCtor ( ) ; } }
{@inheritDoc}
{