Package org.mapstruct.ap.option

Examples of org.mapstruct.ap.option.ReportingPolicy


         * @return The effective policy for reporting unmapped target properties.
         */
        private ReportingPolicy getEffectiveUnmappedTargetPolicy() {
            MapperConfig mapperSettings = MapperConfig.getInstanceOn( ctx.getMapperTypeElement() );
            boolean setViaAnnotation = mapperSettings.isSetUnmappedTargetPolicy();
            ReportingPolicy annotationValue = ReportingPolicy.valueOf( mapperSettings.unmappedTargetPolicy() );

            if ( setViaAnnotation
                || ctx.getOptions().getUnmappedTargetPolicy() == null ) {
                return annotationValue;
            }
View Full Code Here



        private void reportErrorForUnmappedTargetPropertiesIfRequired( ) {

            // fetch settings from element to implement
            ReportingPolicy unmappedTargetPolicy = getEffectiveUnmappedTargetPolicy();

            if ( !unprocessedTargetProperties.isEmpty() && unmappedTargetPolicy.requiresReport() ) {

                ctx.getMessager().printMessage(
                        unmappedTargetPolicy.getDiagnosticKind(),
                        MessageFormat.format(
                                "Unmapped target {0,choice,1#property|1<properties}: \"{1}\"",
                                unprocessedTargetProperties.size(),
                                Strings.join( unprocessedTargetProperties.keySet(), ", " )
                        ),
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.option.ReportingPolicy

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.