-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
In the near future, Java will start restricting deep reflection - for example, setAccessible(true) will become a problem. To prepare for this future, the solver needs to make some backwards incompatible changes.
The solver must enforce the following:
- Any method accessed by the solver needs to be public.
- If a class field being accessed (variable, shadow variable, fact/entity collection etc.) is not public, the solver has to access it via a getter (and setter if mutable).
- If a setter exists, a getter must exist.
- For mutable fields, if a getter exists, a setter must exist.
- Any annotations may be on either the field, on its setter or its getter. Never on more than one.
Every other situation than the ones specifically listed here should fail fast, giving the user a point to what needs to be changed. As this is a backwards incompatible behavior, we can only make this change in the next major version of the solver.
This behavior should be clearly documented.
This doesn't apply to cloning, which has to be handled separately.
Metadata
Metadata
Assignees
Labels
No labels