Add SimplifiedPredicate#246
Conversation
| while (expression instanceof GroupExpression group) | ||
| expression = group.getExpression(); | ||
| while (expression instanceof GroupExpression) { | ||
| if (expression instanceof GroupExpression group) |
|
|
||
| public class SimplifiedPredicate extends Predicate { | ||
|
|
||
| private final Predicate simplified; |
There was a problem hiding this comment.
couldnt simplified be the expression from the super? we can leave it separate if you want but it feels like we could just use the super.expression, no?
| && binders.equals(other.binders); | ||
| } | ||
|
|
||
| public static class Binder { |
There was a problem hiding this comment.
Do we nee dthis to be public? if yes create another file with it, but maybe we dont? not sure
There was a problem hiding this comment.
Yeah we need it to be public, and it is currently accessed as SimplifiedPredicate.Binder which I think makes more sense since we don't want to use Binder in any other context, so I think it should stay nested. What do you think?
There was a problem hiding this comment.
hum ok i see, we can work with that
|
|
||
| private final Predicate simplified; | ||
| private final Predicate origin; | ||
| private final List<Binder> binders; |
There was a problem hiding this comment.
say what you mean by binders
|
|
||
| import spoon.reflect.reference.CtTypeReference; | ||
|
|
||
| public class SimplifiedPredicate extends Predicate { |
There was a problem hiding this comment.
actually add some javadoc exlaining this class nature and what it represents with an example
d812c8f to
604bcef
Compare
2a775bf to
dfb80ab
Compare
This PR adds the
SimplifiedPredicatethat extends thePredicateclass and stores the original and simplified predicates and binders.