ITWissen.info - Tech know how online

reflection

The term reflection is used in the transmission of signals, both in radio transmission and 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

  1. Reflections occur due to inhomogeneities within a transmission medium, at transitions between two transmission media or at transitions between media with different densities, as in the case of optical fibers. In the case of reflection, a signal part 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 part, which is dependent on the impedance difference, is reflected from this impedance-dependent junction and superimposed on the original signal. As a result, the original signal is garbled. 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 given in the capitalized Greek letter gamma 'Gamma'.
  2. 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.
    Boundary beam and total reflection at media

    Boundary beam and total reflection at media

    The transmission component is achieved by different densities of core and cladding glass, which results in total reflection of the light beam at the cladding glass and it remains in the core glass. The reflections that negatively affect transmission occur at inhomogeneities, splicesand connectors.
  3. In acoustics, the reflection of sound waves is frequency-dependent and occurs to a greater extent at medium and high sound frequencies. The reflected sound is the reverberation. Sound waves are reflected when they strike a body depending on its size, material and surface characteristics.
    Transit time differences in sound reflections

    Transit time differences in sound reflections

    For a hard body with a smooth surface, the angle of incidence is equal to the angle of reflection. In the case of curved bodies, scattering or bundling of the reflected sound occurs depending on the curvature. With soft materials, absorption occurs. If reflected sound waves meet directly radiated sound, the two sound signals overlap. If they are coherent, that is, if their phase positions are the same, then they add up; if they are incoherent, their levels subtract. This effect is called the comb filter effect.

Reflection in the context of object-oriented programming

In object-oriented programming, reflection designates a way in which software can access information at runtime via appropriate interfaces that clarify the structure of the software. The structure of a program is described thereby by so-called Meta information. However it is not possible to modify the structure of a software on the basis these information. A close relationship to the reflection has the Introspektion.

Reflection describes a concept to read classes and objects, which are held at run time in the memory, and to modify these to limited extent also. The concept is not supported however by all object-oriented programming languages. For example, when translating C++, all specific information - also called meta-information - such as the designation of attributes, classes and objects is lost due to the pointer arithmetic used by the compiler. In contrast, this information is available in other object-oriented programming languages such as Smalltalk, Python, Ruby, C-Sharp (C#) or Java in a wide variety of forms at the runtime of a program. Frequently in connection with reflection also the term of the Introspektion is called. Under this it is to be understood that the Meta information makes additionally data available to a component.

Meta information summarizes information about the structure of a program. These information can be:

  • Which classes exist?
  • What are their subclasses as well as superclasses?
  • What are their attributes and methods?
  • Which copies of the classes exist?
  • What operations do they support?
  • Which methods are implemented?

Provided this meta-information is available at software runtime, it can be used, for example, to define rules for mapping classes to the tables of a relational database. Object relational mapping tools often use the mechanism of reflection to generate information about a software's structure - the classes and their related objects - at runtime. An example of this is Hibernate - which is an open source framework that maps objects to relational databases.

In this context, we also speak of meta-objects when the elements - classes, attributes and methods - of the structure of a software are available as objects at the runtime of a software.

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, it is the System.Reflection namespace.

In Java, reflection can be used not only to determine information but also to modify it. However, this refers only to the data of the program and not to its structure as a whole. Thus it is not possible to insert new methods or to create further classes dynamically at runtime. However the attributes of an object can be changed or be called dynamically its methods. Reflection is often used with regard to the persistence of objects - objects are inserted into a database at runtime. Also the concept of the reflection finds with Java Beans, with programs for debugging or GUI builders use, whereby these programs are often called Meta programs. So-called meta programs always work on classes and objects of external programs.

Informations:
Englisch: reflection
Updated at: 24.01.2022
#Words: 982
Links: transmission, sound, radiation (R), indium (In), object (O)
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024