Reflection is often used as part of software testing, such as for the runtime creation/instantiation of mock objects . Reflection is also a key strategy for metaprogramming. In some object-oriented programming languages such as C# and Java, reflection can be used to bypass member accessibility rules.