Package org.mapstruct.ap.model.common

Examples of org.mapstruct.ap.model.common.Parameter


    private final Type returnType;
    private final Type genericParam;
    private final Set<Type> importTypes;

    public ListOfJaxbElemToListOfValue(TypeFactory typeFactory) {
        this.parameter = new Parameter( "elementList", typeFactory.getType( List.class ) );
        this.returnType = typeFactory.getType( List.class );
        this.genericParam = typeFactory.getType( JAXBElement.class ).erasure();
        this.importTypes = asSet(
            returnType,
            typeFactory.getType( JAXBElement.class ),
View Full Code Here


        List<T> candidatesWithBestMatchingSourceType = new ArrayList<T>();
        int bestMatchingSourceTypeDistance = Integer.MAX_VALUE;

        // find the methods with the minimum distance regarding getParameter getParameter type
        for ( T method : methods ) {
            Parameter singleSourceParam = method.getSourceParameters().iterator().next();

            int sourceTypeDistance = parameterType.distanceTo( singleSourceParam.getType() );
            bestMatchingSourceTypeDistance =
                addToCandidateListIfMinimal(
                    candidatesWithBestMatchingSourceType,
                    bestMatchingSourceTypeDistance,
                    method,
View Full Code Here

    private final Parameter parameter;
    private final Type returnType;
    private final Set<Type> importTypes;

    public XmlGregorianCalendarToString(TypeFactory typeFactory) {
        this.parameter = new Parameter( "xcal", typeFactory.getType( XMLGregorianCalendar.class ) );
        this.returnType = typeFactory.getType( String.class );
        this.importTypes = asSet(
            parameter.getType(),
            typeFactory.getType( Date.class ),
            typeFactory.getType( SimpleDateFormat.class )
View Full Code Here

    private final Parameter parameter;
    private final Type returnType;
    private final Set<Type> importTypes;

    public JaxbElemToValue(TypeFactory typeFactory) {
        this.parameter = new Parameter( "element", typeFactory.getType( JAXBElement.class ) );
        this.returnType = typeFactory.getType( Object.class );
        this.importTypes = asSet( typeFactory.getType( JAXBElement.class ) );
    }
View Full Code Here

    private final Type returnType;
    private final Set<Type> importTypes;


    public StringToXmlGregorianCalendar(TypeFactory typeFactory) {
        this.parameter = new Parameter( "date", typeFactory.getType( String.class ) );
        this.returnType = typeFactory.getType( XMLGregorianCalendar.class );
        this.importTypes = asSet(
            returnType,
            typeFactory.getType( GregorianCalendar.class ),
            typeFactory.getType( SimpleDateFormat.class ),
View Full Code Here

    private final Parameter parameter;
    private final Type returnType;
    private final Set<Type> importTypes;

    public XmlGregorianCalendarToDate(TypeFactory typeFactory) {
        this.parameter = new Parameter( "xcal", typeFactory.getType( XMLGregorianCalendar.class ) );
        this.returnType = typeFactory.getType( Date.class );
        this.importTypes = asSet( returnType, parameter.getType() );
    }
View Full Code Here

    private final Parameter parameter;
    private final Type returnType;
    private final Set<Type> importTypes;

    public DateToXmlGregorianCalendar(TypeFactory typeFactory) {
        this.parameter = new Parameter( "date", typeFactory.getType( Date.class ) );
        this.returnType = typeFactory.getType( XMLGregorianCalendar.class );

        this.importTypes = asSet(
            returnType,
            parameter.getType(),
View Full Code Here

    private final Parameter parameter;
    private final Set<Type> importedTypes;

    CalendarToZonedDateTime(TypeFactory typeFactory) {
        this.returnType = typeFactory.getType( JavaTimeConstants.ZONED_DATE_TIME_FQN );
        this.parameter = new Parameter( "cal", typeFactory.getType( Calendar.class ) );
        this.importedTypes = asSet( returnType, parameter.getType(), typeFactory.getType( TimeZone.class ) );
    }
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.model.common.Parameter

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.