-
-
Notifications
You must be signed in to change notification settings - Fork 846
Open
Description
Currently, there is no way to do a chain of field accesses. Like it is possible with method calls e.g.
.withMethodCall(MethodCall.invoke(...).onMethodCall())
So for instance, if I want to do something like
.withField("someFieldName").onMethodCall()
or
.withField("someFieldName").onField()
There is an option to provide a FieldLocator.Factory but it only operates within the current class.
There is one way it can be done in my mind, it's by using FieldAccessor e.g. like
.withMethodCall(FieldAccessor.ofField("someFieldName"))
and hence it can be chained as any other MethodCall.
But the problem is that FieldAccessor is an Implementation, not MethodCall :)
Reactions are currently unavailable