-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach Factory
to create instances with arguments
#9
Conversation
# Conflicts: # dependencies.md
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9 +/- ##
============================================
+ Coverage 85.16% 85.67% +0.51%
- Complexity 99 102 +3
============================================
Files 13 13
Lines 364 391 +27
Branches 35 44 +9
============================================
+ Hits 310 335 +25
- Misses 43 44 +1
- Partials 11 12 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov LGTM with some minor comments.
* if the specified class does not have a parameterless | ||
* constructors. Note that nested classes fall under this case | ||
* if the specified class does not have a parameterless constructor. | ||
* Note that nested classes fall under this case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put a period at the end?
/** | ||
* Checks if this [KVisibility] is [public][KVisibility.PUBLIC]. | ||
*/ | ||
private val KVisibility?.isPublic: Boolean | ||
get() = this == KVisibility.PUBLIC | ||
|
||
/** | ||
* Tells if this class originates in the Kotlin code, returning `false` for classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"from the Kotlin code"?
public WithParametersJava(String str, @Nullable Object any, Iterable<String> list) { | ||
// Do nothing. | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's kill this line.
Also: * Remove empty line.
This PR extends the
Factory
class with the ability to create class instances passing given arguments to constructors.