Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynamisch auf Attribute zugreifen

Empfohlene Antworten

hallo,

ich habe folgendes Problem:

ich möchte eine Klasse schreiben, die Eingabeparameter mit einer XML-Datei auf null überprüft.

Die XML-Datei hat folgendes Format:

<package name="packagename">

<class name="classname">

<method name="methodname">

<param name="parametername1" checknull="true" type="komplexertyp">

<subparam name="subparametername1" checknull="true" type="String">

</subparam>

</param>

</method>

</class>

</package>

ich möchte auf den Wert des subparametername1 zugreifen. mir ist bekannt, welchen Typ er hat und in welchem Objekt er steckt, allerdings habe ich nur das komplexe Objekt parametername1. Es kann noch mehrere andere subparameter geben.

Ich müsste irgendwie aus einem String wie "packagename.parametername1.subparametername1" auf den Inhalt dieses Feldes kommen.

Vielen Dank für eure Hilfe

Wenn ich Dein Problem richtig verstehe, mußt Du mit Reflections arbeiten. Da wäre z. B. die Methode Class.getDeclaredFiels(String).

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.