Class DirectivesClass

  • All Implemented Interfaces:
    Iterable<org.xembly.Directive>

    public final class DirectivesClass
    extends Object
    implements Iterable<org.xembly.Directive>
    Directives for generating EO class objects.

    This class generates Xembly directives to create EO object representations of Java classes, including their properties, fields, methods, annotations, and attributes.

    All the class directives are sorted according to JVM specification ClassFile { u4 magic; (absent) u2 minor_version; {@link DirectivesClassProperties} u2 major_version; {@link DirectivesClassProperties} u2 constant_pool_count; (incorporated to the directives) cp_info constant_pool[constant_pool_count-1]; (incorporated to the directives) u2 access_flags; {@link DirectivesClassProperties} u2 this_class; {@link DirectivesClass} (class name) u2 super_class; {@link DirectivesClassProperties} u2 interfaces_count; {@link DirectivesClassProperties} u2 interfaces[interfaces_count]; {@link DirectivesClassProperties} u2 fields_count; {@link DirectivesClass} field_info fields[fields_count]; {@link DirectivesClass} u2 methods_count; {@link DirectivesClass} method_info methods[methods_count]; {@link DirectivesClass} u2 attributes_count; {@link DirectivesClass} attribute_info attributes[attributes_count]; {@link DirectivesClass} } You can read more in the official JVM specification.

    Since:
    0.1.0
    • Constructor Detail

      • DirectivesClass

        public DirectivesClass​(ClassName name)
        Constructor.
        Parameters:
        name - The class name
      • DirectivesClass

        public DirectivesClass​(String classname,
                               String signature,
                               DirectivesClassProperties properties)
        Constructor.
        Parameters:
        classname - The class name
        signature - The class signature
        properties - The class properties
      • DirectivesClass

        public DirectivesClass​(ClassName name,
                               DirectivesMethod method)
        Constructor.
        Parameters:
        name - The class name
        method - The method to include
    • Method Detail

      • iterator

        public Iterator<org.xembly.Directive> iterator()
        Specified by:
        iterator in interface Iterable<org.xembly.Directive>