-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhanced converter related validations and added tests for converters.
- Loading branch information
1 parent
b7d57b5
commit ff7aaef
Showing
31 changed files
with
1,528 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
fluapigen-api/src/main/java/io/toolisticon/fluapigen/api/FluentApiConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.toolisticon.fluapigen.api; | ||
|
||
/** | ||
* Simple converter interface for fluent api parameters, | ||
* | ||
* @param <SOURCE> The source type | ||
* @param <TARGET> The target type | ||
*/ | ||
public interface FluentApiConverter<SOURCE, TARGET> { | ||
TARGET convert(SOURCE source); | ||
|
||
|
||
class NoConversion<TYPE> implements FluentApiConverter<TYPE, TYPE> { | ||
@Override | ||
public TYPE convert(TYPE type) { | ||
return type; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.