developer-delphi-language-rtti

Inspect and manipulate Delphi type information at runtime using RTTI.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-language-rtti
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developer-delphi-language-rtti
Source: https://github.com/cslsoftwares/ParamentersORM/tree/main/.cursor/skills/developer-delphi-language-rtti_V1.1.0
Command: npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-language-rtti

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RTTI in Delphi enables runtime inspection and manipulation of type information, supporting dynamic operations such as mapping between JSON and objects, auto-binding of form fields, and DI via attributes.

Core Features & Use Cases

  • TRttiContext/ TRttiType/ TRttiProperty/ TRttiMethod provide access to type information at runtime.
  • TCustomAttribute and TValue enable metadata-driven logic and value handling in reflection-based workflows.
  • Examples include JSON↔object mapping, dynamic method invocation, and attribute-driven DI.

Quick Start

Run a small example to enumerate a class’s properties and map a JSON object to an instance using RTTI.

Frequently Asked Questions about developer-delphi-language-rtti

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map JSON to Delphi objects dynamically at runtime?

To map JSON to Delphi objects dynamically, you use RTTI to inspect type information at runtime and populate object properties from JSON data without hardcoding field assignments. This enables automated JSON↔object mapping.

How does Delphi RTTI handle attribute-based dependency injection?

Delphi RTTI handles attribute-based dependency injection by reading TCustomAttribute metadata applied to classes or fields at runtime, allowing the framework to resolve and inject dependencies automatically without manual wiring.

What is the best way to enumerate class properties in Delphi at runtime?

The best way to enumerate class properties in Delphi at runtime is using TRttiContext to obtain a TRttiType instance, which provides access to TRttiProperty collections for iterating through all published fields and properties dynamically.

How do I use TValue for safe value handling in Delphi reflection?

You use TValue in Delphi reflection to safely store, retrieve, and convert runtime type values during dynamic property manipulation. TValue ensures type-safe value handling when reading or writing fields via RTTI without direct pointer casting.

When do I need explicit RTTI access in my Delphi application?

You need explicit RTTI access in Delphi when building dynamic systems like metadata-driven JSON mapping, runtime property inspection, or dynamic method invocation. It allows your code to adapt to type structures unknown at compile time.

Can I invoke methods dynamically in Delphi without knowing the type at compile time?

Yes, you can invoke methods dynamically in Delphi using TRttiMethod instances retrieved via RTTI. This allows you to call methods on objects by name at runtime, passing arguments wrapped in TValue for type-safe execution.