Package org.mapstruct.ap.internal.model
Class DefaultMapperReference
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.Field
-
- org.mapstruct.ap.internal.model.MapperReference
-
- org.mapstruct.ap.internal.model.DefaultMapperReference
-
- All Implemented Interfaces:
Writable
public class DefaultMapperReference extends MapperReference
Mapper reference which is retrieved via theMappers#getMapper()method. Used by default if no other component model is specified viaMapper#uses().
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<Type>importTypesprivate booleanisAnnotatedMapperprivate booleanisSingleton
-
Constructor Summary
Constructors Modifier Constructor Description privateDefaultMapperReference(Type type, boolean isAnnotatedMapper, boolean isSingleton, java.util.Set<Type> importTypes, java.lang.String variableName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.static DefaultMapperReferencegetInstance(Type type, boolean isAnnotatedMapper, boolean isSingleton, TypeFactory typeFactory, java.util.List<java.lang.String> otherMapperReferences)booleanisAnnotatedMapper()booleanisSingleton()-
Methods inherited from class org.mapstruct.ap.internal.model.MapperReference
findMapperReference
-
Methods inherited from class org.mapstruct.ap.internal.model.Field
equals, getFieldNames, getType, getVariableName, hashCode, isTypeRequiresImport, isUsed, setTypeRequiresImport, setUsed
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Field Detail
-
isSingleton
private final boolean isSingleton
-
isAnnotatedMapper
private final boolean isAnnotatedMapper
-
importTypes
private final java.util.Set<Type> importTypes
-
-
Method Detail
-
getInstance
public static DefaultMapperReference getInstance(Type type, boolean isAnnotatedMapper, boolean isSingleton, TypeFactory typeFactory, java.util.List<java.lang.String> otherMapperReferences)
-
getImportTypes
public java.util.Set<Type> getImportTypes()
Description copied from class:ModelElementReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.- Overrides:
getImportTypesin classField- Returns:
- A set with type referenced by this model element. Must not be
null.
-
isAnnotatedMapper
public boolean isAnnotatedMapper()
-
isSingleton
public boolean isSingleton()
-
-