New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first version of wrapped by String path . easy way to get / set Object #63
Conversation
Thank you very much for your suggestion. I much prefer discussing the design of an idea first before looking into actual code, which is why I have rejected your pull request. I understand you're thinking of implementing some expression language that abstracts over individual method calls. The specific use case you would like to see covered is accessing array elements by index, even in nested paths. However, I'm pretty sure your current design and solution are lacking tons of things. I don't think we should rush such a big feature into jOOR. Besides, there are good expression language libraries in existence already, including Spring, so why not use that, instead? |
spring it's not relative at all .
|
Yes, that's what I said. I said "I much prefer discussing the design of an idea first before looking into actual code" Another important thing I said was: "However, I'm pretty sure your current design and solution are lacking tons of things. I don't think we should rush such a big feature into jOOR" I'm sorry, I really cannot currently consider your PR, without a thorough discussion about the vision and design of such a feature set. |
the idea is very simple this is Employee[] employees = on(department).call("getEmployees").get();
for (Employee employee : employees) {
Street street = on(employee).call("getAddress").call("getStreet").get();
System.out.println(street);
} My Implement : Employee[] employees = ReflectFactory.getObject("getEmloyees()" ,department );
for (Employee employee : employees) {
Street street = ReflectFactory.getObject("getAddress()/getStreet()" ,employee);
System.out.println(street);
} not just that you can call
will return the first employee |
Thank you for following up. I understand your general idea, I just don't think this is well thought through. There are tons of open questions, which I currently would not really like to address. First off, why invent an own "mini language", rather than just supporting standard Java EL? Please do accept my rejection of this idea for the moment. |
amazing view 👍 |
Hah :-) In my opinion, it would be much easier to extend JXPath to do some additional reflection magic, rather than re-implementing JXPath in this little reflection library called jOOR. Which again underlines my reservation... |
next time i will , i promise 💯 |
hi i added full new branch of wrapped object by String path .
for ex : if i have object from a class i and i need array first index value
b/arr/[0] this will send to me value
not only that i make some observer list so any one can re call same path with different object very fast