Class ParameterProvidedMethods
- java.lang.Object
-
- org.mapstruct.ap.internal.model.source.ParameterProvidedMethods
-
public class ParameterProvidedMethods extends Object
Provides access to theSourceMethod
s that are provided byContext
parameters of aMethod
and maintains the relationship between those methods and their originating parameter.- Author:
- Andreas Gudian
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParameterProvidedMethods.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterProvidedMethods.Builder
builder()
static ParameterProvidedMethods
empty()
List<SourceMethod>
getAllProvidedMethodsInParameterOrder(List<Parameter> orderedParameters)
Parameter
getParameterForProvidedMethod(Method method)
boolean
isEmpty()
-
-
-
Method Detail
-
getAllProvidedMethodsInParameterOrder
public List<SourceMethod> getAllProvidedMethodsInParameterOrder(List<Parameter> orderedParameters)
- Parameters:
orderedParameters
- The parameters of which the provided methods are to be returned.- Returns:
- The methods provided by the given parameters in the order as defined by the parameter list, with the methods of each parameter ordered based on their definition in that parameter's type.
-
getParameterForProvidedMethod
public Parameter getParameterForProvidedMethod(Method method)
- Parameters:
method
- The method for which the defining parameter is to be returned.- Returns:
- The Parameter on which's type the provided method is defined, or
null
if the method was not defined on one of the tracked parameters.
-
isEmpty
public boolean isEmpty()
- Returns:
true
, if no methods are provided by the tracked parameters or no parameters are tracked at all.
-
builder
public static ParameterProvidedMethods.Builder builder()
-
empty
public static ParameterProvidedMethods empty()
-
-