The term reflection is used in the transmission of signals
, and it is used in radio transmission as well as in wired transmission and sound radiation. In addition, the term reflection is also used in object-oriented programming. Reflection
in the context of transmission of electrical, optical and acoustic signals
Reflections occur due to inhomogeneities within a transmission medium, at transitions between two transmission media or at the transition between media with different densities, as in the case of optical fibers. In the case of reflection, a signal component is reflected at the inhomogeneities or the media transitions and travels back in the medium to the source. In the case of conductor-based transmissions, the magnitude of the reflections depends on the impedance difference that exists, for example, in a connector or at the line termination. Cables terminated with the correct impedance, i.e. with the value of the cable impedance, are free of reflections. In the case of reflection, a signal component that is dependent on the impedance difference is reflected from this impedance-dependent junction and superimposed on the original signal. This has the effect of garbling the original signal. In the case of extreme impedance differences, for example in the case of a short circuit or interruption, the garbling can go as far as the cancellation or doubling of the original signal. The measure of the reflection is the reflection factor, which is specified in the capitalized Greek letter gamma.
In optical transmission technology, reflections play a very decisive role in two respects: on the one hand, for the transmission of light in the optical waveguide, and on the other hand, as an interference factor in the case of undesired reflections at inhomogeneities or connections.total reflection of the light beam at the cladding glass and it remains in the core glass. The reflections that negatively affect the transmission occur at inhomogeneities, splices and connectors.
- levels subtract. This effect is called comb filter effect.
context of object-oriented programmingIn object-oriented programming
, reflection designates a way inwhich software can access information
atruntime via appropriate interfaces
thatclarify the structure of the software. The structure of a program is thereby described by so-called meta-information. However, it is not possible to modify the structure of a software on the basis of this information. Introspection has a close relationship to reflection
. Reflectiondescribes a concept of reading classes and objects
thatare held in memory
at runtimeand also modifying them to a limited extent. However, the concept is not supported by all object-oriented programming languages. For example, when translating C++, all specific information - also called meta-information - such as the names of attributes, classes and objects is lost due to the pointer arithmetic used by the compiler. In contrast, in other object-oriented programming languages such as Smalltalk, Python, Ruby, C-Sharp (C#) or Java
, this information is available in a wide variety of forms at the runtime of a program. The term introspection is also frequently mentioned in connection with reflection. This refers to the fact that meta-information provides additional information about a component.Meta-information summarizes information about the structure of a program. This information can be:
- Which classes exist?
- What are their subclasses and superclasses?
- What are their attributes and methods?
- Which copies of the classes exist?
- Which operations do they support?
- What methods are implemented?
that maps objects to relational databases. Inthis context, we also speak of meta-objects when the elements - classes, attributes and methods - of a software's structure are available as objects at a software's runtime
. Programming languages such as Java or the proprietary language C# offer corresponding packages or namespaces for programming reflection - in Java it is the package java.lang.reflect and in the .NET framework
.Reflection. In Java, reflection can be used not only to determine information but also to modify it. However, this only applies to the data of the program and not to its structure as a whole. Thus, it is not possible to insert new methods or create additional classes dynamically at runtime. However, you can change the attributes of an object or call its methods dynamically. Reflection is often used with respect to persisting objects - inserting objects into a database at runtime. The concept of reflection is also used in Java beans, debugging programs, and GUI builders, which is why these programs are often referred to as meta programs. So-called meta programs always work on classes and objects of external programs.