https://kotlinlang.org logo
Title
a

altavir

03/15/2018, 7:52 AM
I think that you should never try to call static member on instance just because it confuses you. Static members are resolved statically by the class name not by member instance. For example if you have a class A inheriting B and call static function on A, when actual object is B, it will still be called on A.
3
q

qwert_ukg

03/15/2018, 7:53 AM
i haven't its an util class, wanna make builder for static class
n

nfrankel

03/15/2018, 7:55 AM
in kotlin, builder pattern is not so often used because default parameters (and named parameters) are a much better fit
q

qwert_ukg

03/15/2018, 7:56 AM
wanna try some extension method on
WebDriverWait
which usage will be looks this
condition { this.someMethodFromExpectedConditionsClass }
h

hho

03/15/2018, 9:35 AM
Maybe I don't understand the problem, but why can't your extension method look like
condition { ExpectedConditions.someMethodFromExpectedConditionsClass }
?
q

qwert_ukg

03/15/2018, 9:43 AM
yep u right, just want to make it more DRY. but now i see