Class Java8FunctionWrapper
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.assignment.AssignmentWrapper
-
- org.mapstruct.ap.internal.model.assignment.Java8FunctionWrapper
-
- All Implemented Interfaces:
Assignment
,Writable
public class Java8FunctionWrapper extends AssignmentWrapper
Wraps the assignment in a Function to be used in Java 8 map methods- Author:
- Filip Hrisafov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.model.common.Assignment
Assignment.AssignmentType
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Field Summary
-
Fields inherited from class org.mapstruct.ap.internal.model.assignment.AssignmentWrapper
fieldAssignment
-
-
Constructor Summary
Constructors Constructor Description Java8FunctionWrapper(Assignment decoratedAssignment)
Java8FunctionWrapper(Assignment decoratedAssignment, Type functionType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.boolean
isDirectAssignment()
-
Methods inherited from class org.mapstruct.ap.internal.model.assignment.AssignmentWrapper
createUniqueVarName, getAssignment, getSourceLocalVarName, getSourceLoopVarName, getSourceParameterName, getSourcePresenceCheckerReference, getSourceReference, getSourceType, getThrownTypes, getType, isCallingUpdateMethod, isFieldAssignment, isSourceReferenceParameter, setAssignment, setSourceLocalVarName, setSourceLoopVarName
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Constructor Detail
-
Java8FunctionWrapper
public Java8FunctionWrapper(Assignment decoratedAssignment)
-
Java8FunctionWrapper
public Java8FunctionWrapper(Assignment decoratedAssignment, Type functionType)
-
-
Method Detail
-
getImportTypes
public Set<Type> getImportTypes()
Description copied from class:ModelElement
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.- Specified by:
getImportTypes
in interfaceAssignment
- Overrides:
getImportTypes
in classAssignmentWrapper
- Returns:
- A set with type referenced by this model element. Must not be
null
.
-
isDirectAssignment
public boolean isDirectAssignment()
- Returns:
true
if the wrapped assignment isAssignment.AssignmentType.DIRECT
,false
otherwise
-
-