Source:
private void initialize() { if ( initialized ) { return; } AccessorNamingStrategy defaultAccessorNamingStrategy; BuilderProvider defaultBuilderProvider; if ( elementUtils.getTypeElement( ImmutablesConstants.IMMUTABLE_FQN ) != null ) { defaultAccessorNamingStrategy = new ImmutablesAccessorNamingStrategy(); defaultBuilderProvider = new ImmutablesBuilderProvider(); messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Immutables found on classpath, using Immutable builder pattern" ); } else if ( elementUtils.getTypeElement( FreeBuilderConstants.FREE_BUILDER_FQN ) != null ) { defaultAccessorNamingStrategy = new FreeBuilderAccessorNamingStrategy(); defaultBuilderProvider = new DefaultBuilderProvider(); messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Freebuilder found on classpath, using Freebuilder builder pattern" ); } else { defaultAccessorNamingStrategy = new DefaultAccessorNamingStrategy(); defaultBuilderProvider = new DefaultBuilderProvider(); messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: using default builder pattern." ); } this.accessorNamingStrategy = Services.get( AccessorNamingStrategy.class, defaultAccessorNamingStrategy ); this.accessorNamingStrategy.init( this ); if ( this.accessorNamingStrategy != defaultAccessorNamingStrategy ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Overriding found accessor naming strategy with user SPI defined strategy" ); } this.builderProvider = Services.get( BuilderProvider.class, defaultBuilderProvider ); this.builderProvider.init( this ); if ( this.accessorNamingStrategy != defaultAccessorNamingStrategy ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Overriding found builder strategy with user SPI defined strategy" ); } this.accessorNaming = new AccessorNamingUtils( this.accessorNamingStrategy ); this.initialized = true; }

Target:
private void initialize() { if ( initialized ) { return; } AccessorNamingStrategy defaultAccessorNamingStrategy; BuilderProvider defaultBuilderProvider; if ( elementUtils.getTypeElement( ImmutablesConstants.IMMUTABLE_FQN ) != null ) { defaultAccessorNamingStrategy = new ImmutablesAccessorNamingStrategy(); defaultBuilderProvider = new ImmutablesBuilderProvider(); if ( verbose ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Immutables found on classpath" ); } } else if ( elementUtils.getTypeElement( FreeBuilderConstants.FREE_BUILDER_FQN ) != null ) { defaultAccessorNamingStrategy = new FreeBuilderAccessorNamingStrategy(); defaultBuilderProvider = new DefaultBuilderProvider(); if ( verbose ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Freebuilder found on classpath" ); } } else { defaultAccessorNamingStrategy = new DefaultAccessorNamingStrategy(); defaultBuilderProvider = new DefaultBuilderProvider(); } this.accessorNamingStrategy = Services.get( AccessorNamingStrategy.class, defaultAccessorNamingStrategy ); this.accessorNamingStrategy.init( this ); if ( verbose ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Using accessor naming strategy: " + this.accessorNamingStrategy.getClass().getCanonicalName() ); } this.builderProvider = Services.get( BuilderProvider.class, defaultBuilderProvider ); this.builderProvider.init( this ); if ( verbose ) { messager.printMessage( Diagnostic.Kind.NOTE, "MapStruct: Using builder provider: " + this.builderProvider.getClass().getCanonicalName() ); } this.accessorNaming = new AccessorNamingUtils( this.accessorNamingStrategy ); this.initialized = true; }