I am debating the proper, OO-design to use another object's functionality (methods) from a java class, while both objects remain decoupled as much as possible.
For example, at some point in my ...
This is a design question. The design is pseudo-code and represents a small example but I may add a lot more methods, data, logic in the future.
In this example, I ...
Currently I'm using the java parser japa to create an abstract syntax tree (AST) of a java file. With this AST I'm doing some code generation (e.g.: if there's an annotation ...
Since encapsulation is considered better than inheritance (according to Effective Java and other sources), there is a pattern of Forwarding an Object. (I believe the Decorator pattern is a synonym ...