Injection: you modify the code of the client in order to receive fields or set fields
Now Jagex has some code to detect these kind of modifications in the client, by loading certain methods and/or fields, they could just attempt to load Widget.getX for example.
example of an injected class:
class x {
int y;
//now comes the injected getter
public int getY() {
return y;
}
}
Reflection:
A library in java, way harder to detect but has a performance overhead(really small, but it's there)
I'm not going to explain what it is exactly here, but this is a good video that explains it really well:
https://www.youtube.com/watch?v=agnblS47F18
'Because reflection involves types that are dynamically resolved, certain Java virtual machine optimizations can not be performed. Consequently, reflective operations have slower performance than their non-reflective counterparts, and should be avoided in sections of code which are called frequently in performance-sensitive applications.'
So the tradeoff,
Reflection
pros:
way harder to detect than injection
cons:
small overhead
less powerful(can't disable model rendering etc)
Injection:
pros:
no overhead
powerful(can use things like disable model rendering)
cons:
DETECTABLE(IS ACTUALLY BEING DETECTED NOW)