]
Benoit Voisin commented on DROOLS-582:
--------------------------------------
I could work on an implementation if this Feature request is accepted
Have all declared type instance implement a helper interface
------------------------------------------------------------
Key: DROOLS-582
URL:
https://issues.jboss.org/browse/DROOLS-582
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Benoit Voisin
Assignee: Mark Proctor
Following DROOLS-546, and to provide simple and safe access to FactType instances in Java
code, we could have each instance implement an interface looking like :
interface DeclaredFact {
boolean hasField(String name);
void setFieldValue(String name, Object value);
Object getFieldValue(String name);
FactType getKieFactType(); //RQ: possible on name collisions with existing kieFactType
field
}
The setField/getField should throw proper exceptions for unknown fields.