Class ParameterProvidedMethods
- java.lang.Object
-
- org.mapstruct.ap.internal.model.source.ParameterProvidedMethods
-
public class ParameterProvidedMethods extends Object
Provides access to theSourceMethods that are provided byContextparameters of aMethodand maintains the relationship between those methods and their originating parameter.- Author:
- Andreas Gudian
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParameterProvidedMethods.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterProvidedMethods.Builderbuilder()static ParameterProvidedMethodsempty()List<SourceMethod>getAllProvidedMethodsInParameterOrder(List<Parameter> orderedParameters)ParametergetParameterForProvidedMethod(Method method)booleanisEmpty()
-
-
-
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
nullif 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()
-
-