Package org.mapstruct.ap.model.assignment

Examples of org.mapstruct.ap.model.assignment.GetterCollectionOrMapWrapper


                    else {
                        // wrap the assignment in the setter method
                        assignment = new SetterWrapper( assignment, method.getThrownTypes() );

                        // target accessor is getter, so wrap the setter in getter map/ collection handling
                        assignment = new GetterCollectionOrMapWrapper( assignment );
                    }

                    // For collections and maps include a null check, when the assignment type is DIRECT.
                    // for mapping methods (builtin / custom), the mapping method is responsible for the
                    // null check. Typeconversions do not apply to collections and maps.
View Full Code Here


                // target accessor is setter, so decorate assignment as setter
                assignment = new SetterWrapper( assignment, method.getThrownTypes() );

                // wrap when dealing with getter only on target
                if ( Executables.isGetterMethod( targetAccessor ) ) {
                    assignment = new GetterCollectionOrMapWrapper( assignment );
                }
            }
            else {
                ctx.getMessager().printMessage(
                    Diagnostic.Kind.ERROR,
View Full Code Here

            }
            else {
                targetType = ctx.getTypeFactory().getReturnType( targetAccessor );

                // target accessor is getter, so wrap the setter in getter map/ collection handling
                assignment = new GetterCollectionOrMapWrapper( assignment );
            }

            return new PropertyMapping( targetAccessor.getSimpleName().toString(), targetType, assignment );
        }
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.model.assignment.GetterCollectionOrMapWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.