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 :)
Currently, there is no way to do a chain of field accesses. Like it is possible with method calls e.g.
So for instance, if I want to do something like
or
There is an option to provide a
FieldLocator.Factorybut it only operates within the current class.There is one way it can be done in my mind, it's by using
FieldAccessore.g. likeand hence it can be chained as any other MethodCall.
But the problem is that
FieldAccessoris anImplementation, notMethodCall:)