mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#109 Removing package cycle around generated prism types
This commit is contained in:
parent
c77809a8fd
commit
dae4e94a0a
@ -39,15 +39,7 @@ import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.util.ElementKindVisitor6;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
|
||||
import net.java.dev.hickory.prism.GeneratePrism;
|
||||
import net.java.dev.hickory.prism.GeneratePrisms;
|
||||
|
||||
import org.mapstruct.IterableMapping;
|
||||
import org.mapstruct.MapMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.ap.option.Options;
|
||||
import org.mapstruct.ap.option.ReportingPolicy;
|
||||
import org.mapstruct.ap.processor.DefaultModelElementProcessorContext;
|
||||
@ -88,14 +80,6 @@ import org.mapstruct.ap.util.AnnotationProcessingException;
|
||||
* @author Gunnar Morling
|
||||
*/
|
||||
@SupportedAnnotationTypes("org.mapstruct.Mapper")
|
||||
@GeneratePrisms({
|
||||
@GeneratePrism(value = Mapper.class, publicAccess = true),
|
||||
@GeneratePrism(value = Mapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = Mappings.class, publicAccess = true),
|
||||
@GeneratePrism(value = IterableMapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = MapMapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = MappingTarget.class, publicAccess = true)
|
||||
})
|
||||
@SupportedOptions({
|
||||
MappingProcessor.SUPPRESS_GENERATOR_TIMESTAMP,
|
||||
MappingProcessor.UNMAPPED_TARGET_POLICY,
|
||||
|
@ -45,7 +45,7 @@ import javax.lang.model.type.TypeMirror;
|
||||
import javax.lang.model.util.Elements;
|
||||
import javax.lang.model.util.Types;
|
||||
|
||||
import org.mapstruct.ap.MappingTargetPrism;
|
||||
import org.mapstruct.ap.prism.MappingTargetPrism;
|
||||
import org.mapstruct.ap.util.AnnotationProcessingException;
|
||||
|
||||
/**
|
@ -21,7 +21,7 @@ package org.mapstruct.ap.model.source;
|
||||
import javax.lang.model.element.AnnotationMirror;
|
||||
import javax.lang.model.element.AnnotationValue;
|
||||
|
||||
import org.mapstruct.ap.IterableMappingPrism;
|
||||
import org.mapstruct.ap.prism.IterableMappingPrism;
|
||||
|
||||
/**
|
||||
* Represents an iterable mapping as configured via {@code @IterableMapping}.
|
||||
|
@ -20,7 +20,7 @@ package org.mapstruct.ap.model.source;
|
||||
|
||||
import javax.lang.model.element.AnnotationMirror;
|
||||
|
||||
import org.mapstruct.ap.MapMappingPrism;
|
||||
import org.mapstruct.ap.prism.MapMappingPrism;
|
||||
|
||||
/**
|
||||
* Represents a map mapping as configured via {@code @MapMapping}.
|
||||
|
@ -27,8 +27,8 @@ import javax.lang.model.element.AnnotationMirror;
|
||||
import javax.lang.model.element.AnnotationValue;
|
||||
import javax.lang.model.element.Element;
|
||||
|
||||
import org.mapstruct.ap.MappingPrism;
|
||||
import org.mapstruct.ap.MappingsPrism;
|
||||
import org.mapstruct.ap.prism.MappingPrism;
|
||||
import org.mapstruct.ap.prism.MappingsPrism;
|
||||
import org.mapstruct.ap.util.AnnotationProcessingException;
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
|
||||
* and/or other contributors as indicated by the @authors tag. See the
|
||||
* copyright.txt file in the distribution for a full listing of all
|
||||
* contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.mapstruct.ap.prism;
|
||||
|
||||
import net.java.dev.hickory.prism.GeneratePrism;
|
||||
import net.java.dev.hickory.prism.GeneratePrisms;
|
||||
|
||||
import org.mapstruct.IterableMapping;
|
||||
import org.mapstruct.MapMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import org.mapstruct.Mappings;
|
||||
|
||||
/**
|
||||
* Triggers the generation of prism types using <a href="https://java.net/projects/hickory">Hickory</a>.
|
||||
*
|
||||
* @author Gunnar Morling
|
||||
*/
|
||||
@GeneratePrisms({
|
||||
@GeneratePrism(value = Mapper.class, publicAccess = true),
|
||||
@GeneratePrism(value = Mapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = Mappings.class, publicAccess = true),
|
||||
@GeneratePrism(value = IterableMapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = MapMapping.class, publicAccess = true),
|
||||
@GeneratePrism(value = MappingTarget.class, publicAccess = true)
|
||||
})
|
||||
public class PrismGenerator {
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
|
||||
* and/or other contributors as indicated by the @authors tag. See the
|
||||
* copyright.txt file in the distribution for a full listing of all
|
||||
* contributors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* <p>
|
||||
* This package contains the generated prism types for accessing the MapStruct annotations in a comfortable way.
|
||||
* </p>
|
||||
*/
|
||||
package org.mapstruct.ap.prism;
|
@ -22,13 +22,13 @@ import java.util.ListIterator;
|
||||
|
||||
import javax.lang.model.element.TypeElement;
|
||||
|
||||
import org.mapstruct.ap.MapperPrism;
|
||||
import org.mapstruct.ap.model.Annotation;
|
||||
import org.mapstruct.ap.model.AnnotationMapperReference;
|
||||
import org.mapstruct.ap.model.Mapper;
|
||||
import org.mapstruct.ap.model.MapperReference;
|
||||
import org.mapstruct.ap.model.TypeFactory;
|
||||
import org.mapstruct.ap.option.OptionsHelper;
|
||||
import org.mapstruct.ap.prism.MapperPrism;
|
||||
|
||||
/**
|
||||
* An {@link ModelElementProcessor} which converts the given {@link Mapper}
|
||||
|
@ -41,7 +41,6 @@ import javax.lang.model.util.Elements;
|
||||
import javax.lang.model.util.Types;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
|
||||
import org.mapstruct.ap.MapperPrism;
|
||||
import org.mapstruct.ap.conversion.ConversionProvider;
|
||||
import org.mapstruct.ap.conversion.Conversions;
|
||||
import org.mapstruct.ap.conversion.DefaultConversionContext;
|
||||
@ -63,6 +62,7 @@ import org.mapstruct.ap.model.source.Method;
|
||||
import org.mapstruct.ap.model.source.MethodMatcher;
|
||||
import org.mapstruct.ap.option.Options;
|
||||
import org.mapstruct.ap.option.ReportingPolicy;
|
||||
import org.mapstruct.ap.prism.MapperPrism;
|
||||
import org.mapstruct.ap.util.Executables;
|
||||
import org.mapstruct.ap.util.Filters;
|
||||
import org.mapstruct.ap.util.Strings;
|
||||
|
@ -34,11 +34,6 @@ import javax.lang.model.type.TypeKind;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
|
||||
import org.mapstruct.ap.IterableMappingPrism;
|
||||
import org.mapstruct.ap.MapMappingPrism;
|
||||
import org.mapstruct.ap.MapperPrism;
|
||||
import org.mapstruct.ap.MappingPrism;
|
||||
import org.mapstruct.ap.MappingsPrism;
|
||||
import org.mapstruct.ap.model.Parameter;
|
||||
import org.mapstruct.ap.model.Type;
|
||||
import org.mapstruct.ap.model.TypeFactory;
|
||||
@ -46,6 +41,11 @@ import org.mapstruct.ap.model.source.IterableMapping;
|
||||
import org.mapstruct.ap.model.source.MapMapping;
|
||||
import org.mapstruct.ap.model.source.Mapping;
|
||||
import org.mapstruct.ap.model.source.Method;
|
||||
import org.mapstruct.ap.prism.IterableMappingPrism;
|
||||
import org.mapstruct.ap.prism.MapMappingPrism;
|
||||
import org.mapstruct.ap.prism.MapperPrism;
|
||||
import org.mapstruct.ap.prism.MappingPrism;
|
||||
import org.mapstruct.ap.prism.MappingsPrism;
|
||||
import org.mapstruct.ap.util.AnnotationProcessingException;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user