
public class SourceRHS extends ModelElement implements Assignment
Assignment.AssignmentTypeWritable.Context| Constructor and Description |
|---|
SourceRHS(String sourceParameterName,
String sourceReference,
String sourcePresenceCheckerReference,
Type sourceType,
Set<String> existingVariableNames,
String sourceErrorMessagePart) |
SourceRHS(String sourceReference,
Type sourceType,
Set<String> existingVariableNames,
String sourceErrorMessagePart) |
| Modifier and Type | Method and Description |
|---|---|
String |
createUniqueVarName(String desiredName)
Creates an unique safe (local) variable name.
|
Set<Type> |
getImportTypes()
Returns a set containing those
Types referenced by this model element for which an import statement needs
to be declared. |
String |
getSourceErrorMessagePart() |
String |
getSourceLocalVarName()
|
String |
getSourceLoopVarName()
See
Assignment.getSourceLoopVarName() (java.lang.String) } |
String |
getSourceParameterName()
Returns the source parameter name, to which this assignment applies.
|
String |
getSourcePresenceCheckerReference()
the source presence checker reference
|
String |
getSourceReference()
the source reference being a source-getter, a constant, nested method call, etc.
|
Type |
getSourceType()
the source type used in the matching process
|
Type |
getSourceTypeForMatching()
The source type that is to be used when resolving the mapping from source to target.
|
List<Type> |
getThrownTypes()
returns all types exception types thrown by this assignment.
|
Assignment.AssignmentType |
getType()
Returns whether the type of assignment
|
boolean |
isCallingUpdateMethod() |
boolean |
isSourceReferenceParameter() |
void |
setAssignment(Assignment assignment)
An assignment in itself can wrap another assignment.
|
void |
setSourceLocalVarName(String sourceLocalVarName)
Replaces the sourceReference at the call site in the assignment in the template with this sourceLocalVarName.
|
void |
setSourceLoopVarName(String sourceLoopVarName)
Replaces the sourceLocalVar or sourceReference at the call site in the assignment in the template with this
sourceLoopVarName.
|
void |
setUseElementAsSourceTypeForMatching(boolean useElementAsSourceTypeForMatching)
For collection type, use element as source type to find a suitable mapping method.
|
String |
toString() |
getTemplateName, getTemplateNameForClass, writepublic SourceRHS(String sourceReference, Type sourceType, Set<String> existingVariableNames, String sourceErrorMessagePart)
public String getSourceReference()
AssignmentgetSourceReference in interface Assignmentpublic boolean isSourceReferenceParameter()
isSourceReferenceParameter in interface Assignmentpublic String getSourcePresenceCheckerReference()
AssignmentgetSourcePresenceCheckerReference in interface Assignmentpublic Type getSourceType()
AssignmentgetSourceType in interface Assignmentpublic String createUniqueVarName(String desiredName)
AssignmentcreateUniqueVarName in interface AssignmentdesiredName - the desired namepublic String getSourceLocalVarName()
AssignmentgetSourceLocalVarName in interface Assignmentpublic void setSourceLocalVarName(String sourceLocalVarName)
AssignmentsetSourceLocalVarName in interface AssignmentsourceLocalVarName - source local variable namepublic String getSourceLoopVarName()
AssignmentAssignment.getSourceLoopVarName() (java.lang.String) }getSourceLoopVarName in interface Assignmentpublic void setSourceLoopVarName(String sourceLoopVarName)
AssignmentsetSourceLoopVarName in interface AssignmentsourceLoopVarName - loop variablepublic Set<Type> getImportTypes()
ModelElementTypes referenced by this model element for which an import statement needs
to be declared.getImportTypes in interface AssignmentgetImportTypes in class ModelElementnull.public List<Type> getThrownTypes()
AssignmentgetThrownTypes in interface Assignmentpublic void setAssignment(Assignment assignment)
AssignmentsetAssignment in interface Assignmentassignment - the assignment to setpublic Assignment.AssignmentType getType()
AssignmentgetType in interface AssignmentAssignment.AssignmentTypepublic boolean isCallingUpdateMethod()
isCallingUpdateMethod in interface Assignmentpublic String getSourceErrorMessagePart()
public Type getSourceTypeForMatching()
public void setUseElementAsSourceTypeForMatching(boolean useElementAsSourceTypeForMatching)
useElementAsSourceTypeForMatching - uses the element of a collection as source type for the matching processpublic String getSourceParameterName()
AssignmentgetSourceParameterName in interface AssignmentCopyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.