Search in sources :

Example 1 with DefaultMapperReference

use of org.mapstruct.ap.internal.model.DefaultMapperReference in project mapstruct by mapstruct.

the class MapperCreationProcessor method initReferencedMappers.

private List<MapperReference> initReferencedMappers(TypeElement element, MapperConfiguration mapperConfig) {
    List<MapperReference> result = new LinkedList<MapperReference>();
    List<String> variableNames = new LinkedList<String>();
    for (TypeMirror usedMapper : mapperConfig.uses()) {
        DefaultMapperReference mapperReference = DefaultMapperReference.getInstance(typeFactory.getType(usedMapper), MapperPrism.getInstanceOn(typeUtils.asElement(usedMapper)) != null, typeFactory, variableNames);
        result.add(mapperReference);
        variableNames.add(mapperReference.getVariableName());
    }
    return result;
}
Also used : DefaultMapperReference(org.mapstruct.ap.internal.model.DefaultMapperReference) MapperReference(org.mapstruct.ap.internal.model.MapperReference) TypeMirror(javax.lang.model.type.TypeMirror) LinkedList(java.util.LinkedList) DefaultMapperReference(org.mapstruct.ap.internal.model.DefaultMapperReference)

Aggregations

LinkedList (java.util.LinkedList)1 TypeMirror (javax.lang.model.type.TypeMirror)1 DefaultMapperReference (org.mapstruct.ap.internal.model.DefaultMapperReference)1 MapperReference (org.mapstruct.ap.internal.model.MapperReference)1