I have rules of this format:
Condition -> Condition OPERATOR Condition | Condition
Condition -> attribute OPERATOR
value OPERATOR -> EQUALS | STARTS WITH | ENDS WITH | AND | OR | NOT EQUALS | CONTAINS
I need to create a JAVA POJO (setters/getters) for the given rules. How can I do it?
Is there any external parser tool that should be created. I am able to create for OPERATOR part:
//POJO CLASS
Class Condtion{
private String attr;
private String op;
private String value;
public String getAttr(){
this.attr=attr;
}
public String getOp(){
this.op=op;
}
public String getValue(){
this.value=value;
}
//setters for above three
}
How to create POJO for the rules Condition->Condition OPERATOR Condition | Condition
?