Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#112): Save All Class Properties as Separate Object Attributes #127

Merged
merged 6 commits into from
Oct 4, 2023

Conversation

volodya-lombrozo
Copy link
Member

@volodya-lombrozo volodya-lombrozo commented Oct 4, 2023

Save all java class properties as separate eo attributes.
Closes: #112.


History:


PR-Codex overview

This PR focuses on improving the XML representation of classes in the code.

Detailed summary

  • The XmlClass class now includes a properties() method that retrieves the class properties.
  • The XmlClassProperties class is a new class that represents the properties of a class.
  • The XmlBytecode class now uses the properties().access() method instead of clazz.access() to retrieve the class access modifiers.
  • The BytecodeClass class has added a TODO comment to implement support for additional class properties.
  • The BytecodeRepresentation class now imports DirectivesClass instead of ClassDirectives.
  • The XmlData class now includes a name field and constructors that accept a name parameter.
  • The XmlData.directives() method now includes the name attribute in the directives if the name field is not empty.
  • The XmlInstruction class has removed the decodeHexString() method and now uses the HexString.decode() method.
  • The XmlClass class now includes a name() method that retrieves the class name.
  • The XmlClass class now uses the properties() method to retrieve the class name and access modifiers.
  • The XmlClass.methods() method now checks if the node is a method and if it has a base attribute before adding it to the list of methods.
  • The ClassDirectivesTest class has been renamed to DirectivesClassTest.
  • The DirectivesClassTest class now uses DirectivesClass instead of ClassDirectives.
  • The XmlClassProperties class is a new class that represents the properties of a class.
  • The Application.xmir file has been updated with the new XML representation.

The following files were skipped due to too many changes: src/it/eo-to-bytecode/target/jeo/xmir/org/eolang/jeo/Application.xmir, src/main/java/org/eolang/jeo/representation/asm/HexString.java, src/test/java/org/eolang/jeo/representation/asm/DirectivesClassPropertiesTest.java, src/main/java/org/eolang/jeo/representation/asm/ClassDirectives.java, src/main/java/org/eolang/jeo/representation/asm/DirectivesClassProperties.java

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@volodya-lombrozo
Copy link
Member Author

@rultor merge

@rultor
Copy link
Contributor

rultor commented Oct 4, 2023

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 496af72 into objectionary:master Oct 4, 2023
17 checks passed
@rultor
Copy link
Contributor

rultor commented Oct 4, 2023

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 3min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClassDirectives.java:188-192: Implement different way to...
3 participants