3 个仓库
Creates new Java classes from scratch during execution, defining superclass, methods, and behavior.
Distinct from Dynamic Class Creation: Distinct from Dynamic Class Creation: focuses on full class construction with custom bytecode, not simple object creation.
Explore 3 awesome GitHub repositories matching programming languages & runtimes · Runtime Class Constructors. Refine with filters or upvote what's useful.
Byte Buddy is a runtime code generation and bytecode manipulation library for Java. It provides a fluent API for creating and modifying Java classes during execution, enabling developers to define class structures, methods, and fields programmatically without requiring a compiler or direct bytecode assembly. The library supports agent-based class transformation, allowing loaded classes to be modified during JVM startup or runtime through a Java agent that intercepts class loading. It offers bytecode-level method interception for fine-grained control over method behavior, annotation-based code
Creates new Java classes from scratch during execution without needing a compiler.
attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it
Creates classes dynamically at runtime by specifying attribute names and types with optional base classes.
Javassist 是一个用于分析、修改和生成 Java 字节码和类文件的字节码工程工具包。它作为一个字节码操作库,允许通过直接字节码访问或高级源代码语法来编辑类文件。 该项目提供专门的工具,用于在运行时程序化创建新的 Java 类和接口。它包括用于拦截方法调用的动态代理生成器,以及在类加载到 Java 虚拟机时自动修改类定义的类加载器拦截器。 其他功能涵盖 Java 字节码分析和热代码重载,以替换运行进程中的类定义。该工具包还支持修改已编译的类文件,并检查方法指令以了解程序流。
Enables the creation of Java classes or interfaces from scratch at runtime, including methods and fields.