Class DirectivesClass

java.lang.Object
org.eolang.jeo.representation.directives.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 Details

    • 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
    • DirectivesClass

      public DirectivesClass(Format format, ClassName name, DirectivesClassProperties properties, List<DirectivesField> fields, List<DirectivesMethod> methods, String signature, DirectivesAnnotations annotations, DirectivesAttributes attributes)
      Constructor.
      Parameters:
      format - The format of the directives
      name - The class name
      properties - The class properties
      fields - The class fields
      methods - The class methods
      signature - The class signature
      annotations - The annotations
      attributes - The attributes
  • Method Details

    • iterator

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