4 ms·
Correct. Annotations (like @Entity in JPA/Hibernate) and reflection is what I mean. Several Java libraries use annotations in a good way and also once one mas
by eitland 4y ago
Correct.
Annotations (like @Entity in JPA/Hibernate) and reflection is what I mean.
Several Java libraries use annotations in a good way and also once one masters Java, they aren't too bad to make oneselves.
Reflection is about taking decisions and even changing behavior at runtime, like "iterate over all classes in this package, filter the ones with name pattern/annotation (or whatever other information is available at runtime) and use/update them.
Reflection is very powerful and IMO somewhat more tricky than annotations.