cangjie-reflect-and-annotation

Explain Cangjie reflection and annotation with TypeInfo and overflow annotations.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-reflect-and-annotation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-reflect-and-annotation
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/reflect_and_annotation
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-reflect-and-annotation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers understand and utilize Cangjie language's advanced features for metaprogramming, including how to control integer overflow behavior and dynamically inspect and manipulate code elements at runtime.

Core Features & Use Cases

  • Integer Overflow Control: Manage arithmetic overflow with @OverflowThrowing, @OverflowWrapping, and @OverflowSaturating annotations.
  • Custom Annotations: Define and apply custom annotations to classes, members, and parameters using @Annotation.
  • Runtime Reflection: Inspect types, variables, properties, and functions using the TypeInfo class for dynamic code analysis and manipulation.
  • Use Case: Debugging complex arithmetic operations by precisely controlling overflow behavior, or building a plugin system that discovers and utilizes custom annotations at runtime.

Quick Start

Show me how to use the @OverflowThrowing annotation on a function that performs addition.

Frequently Asked Questions about cangjie-reflect-and-annotation

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

FAQPage Schema
How do I control integer overflow in Cangjie?

Control integer overflow in Cangjie by applying built-in annotations like @OverflowThrowing, @OverflowWrapping, or @OverflowSaturating to manage arithmetic behavior during runtime execution.

How do I inspect runtime type information in Cangjie?

Inspect runtime type information in Cangjie by utilizing the TypeInfo class to dynamically analyze variables, properties, and functions for advanced debugging or metaprogramming tasks.

Can I create custom annotations in Cangjie?

Create custom annotations in Cangjie by defining them with the @Annotation marker, allowing you to apply metadata to classes, members, and parameters for dynamic runtime discovery.

What is metaprogramming in Cangjie used for?

Metaprogramming in Cangjie is used for dynamically inspecting and manipulating code elements at runtime, which is essential for building plugin systems or performing advanced dynamic code analysis.

Does Cangjie support reflection for dynamic code analysis?

Cangjie supports reflection for dynamic code analysis by providing the TypeInfo class to inspect types and functions, enabling developers to manipulate code elements during runtime.