Releases: MarketAlly/IronJava
IronJava 2.1.2 Release Notes
Fixed
- Critical Bug Fix: Fixed annotation parsing in AstBuilder
- Annotations were not being parsed at all (always returned empty collections)
- Root cause: BuildAnnotations method was checking for AnnotationContext directly, but modifier contexts
contain annotations as child nodes - Fixed by properly checking child nodes of modifier contexts for annotations
Added
- AnnotationExpression class to properly represent annotations in element values
- Visitor methods for AnnotationExpression in IJavaVisitor interfaces
- Comprehensive annotation parsing tests
Technical Details
The issue was in the BuildAnnotations method which expected Java9Parser.AnnotationContext instances directly,
but when called with modifier contexts (like classModifier, interfaceModifier, etc.), it needed to check the
child nodes since modifiers can contain annotations.
Known Issues
- Annotation arguments may still need additional work for complex cases (nested annotations, array values)
- AnnotationExpression serialization support pending
This release fixes the critical bug reported where annotations were not being parsed at all, breaking the
ability to analyze frameworks like Spring Boot, Jakarta EE, and other annotation-based Java code.
IronJava v2.1.1 Release Notes
🐛 Bug Fixes
Fixed: Nested Types Not Being Populated
- Issue: Nested type declarations (inner classes, interfaces, enums) were being parsed but not populated in
the NestedTypes property of their parent types - Root Cause: The BuildClassMembers method was attempting to cast nested type declarations as
MemberDeclaration, which failed silently, causing nested types to be ignored - Solution:
- Created separate BuildClassBody, BuildInterfaceBody, and BuildEnumBody methods that properly separate
members from nested types - Updated all type declaration visitors to use these new methods
- Nested types are now correctly populated in the AST
- Created separate BuildClassBody, BuildInterfaceBody, and BuildEnumBody methods that properly separate
🔧 Technical Details
Files Modified:
- AstBuilder.cs - Implemented proper nested type handling in the parser
- Added ClassBodyResult helper class to return both members and nested types
- Modified BuildClassMember to only handle actual members (fields, methods)
- Created new methods to properly parse and categorize nested types
What This Fixes:
- ClassDeclaration.NestedTypes now correctly contains inner classes, interfaces, enums
- InterfaceDeclaration.NestedTypes now correctly contains nested types
- EnumDeclaration.NestedTypes now correctly contains nested types
- The Body property correctly includes both members and nested types
✅ Verification
Tested with complex nested structures:
public class OuterClass {
public class InnerClass { }
public static class StaticNestedClass { }
public interface NestedInterface { }
public enum NestedEnum { VALUE1, VALUE2 }
}
All nested types are now properly accessible via the AST.
📦 No Breaking Changes
This is a bug fix release with no API changes. Existing code will continue to work as before, but will now
correctly receive nested type information.
IronJava v2.1.0 Release Notes
🎉 New Features
Nested Types Support
- Added full support for nested type declarations (inner classes, interfaces, enums, and annotations)
- All type declaration nodes (ClassDeclaration, InterfaceDeclaration, EnumDeclaration, AnnotationDeclaration)
now include a NestedTypes property - The Body property now correctly includes both members and nested types
- Enables proper AST representation of Java code with nested class structures
🐛 Bug Fixes
Fixed Constructor Parameter Issues
- Resolved compilation errors in AstTransformer.cs where constructor calls were missing the nestedTypes
parameter - Fixed incorrect parameter ordering in type declaration constructors
- Updated AstBuilder.cs to include all required parameters when creating type declaration nodes
JSON Serialization Improvements
- Added serialization support for nestedTypes in all type declarations
- Implemented backward-compatible deserialization that handles JSON without nestedTypes or isRecord
properties - Fixed KeyNotFoundException errors when deserializing older JSON formats
🔧 Technical Changes
- Updated all type declaration constructors to include the nestedTypes parameter
- Modified AST transformation logic to preserve nested types during transformations
- Enhanced JSON serialization/deserialization to handle the new property gracefully
- Updated test files to reflect the new constructor signatures
📦 Breaking Changes
None - This release maintains backward compatibility. Existing code will continue to work, with empty nested
type lists provided by default where needed.
🚀 Migration Guide
If you're creating type declaration nodes manually, update your constructor calls to include the nestedTypes
parameter:
// Before
new ClassDeclaration(location, name, modifiers, annotations,
typeParameters, superClass, interfaces, members, javaDoc, isRecord);
// After
new ClassDeclaration(location, name, modifiers, annotations,
typeParameters, superClass, interfaces, members, nestedTypes, javaDoc, isRecord);
For most users consuming the parsed AST, no changes are required.
IronJava v2.0.0 Update
Breaking Changes
Namespace Change
The root namespace has been changed from IronJava to MarketAlly.IronJava to better reflect the organization behind the project.
Migration Guide
Update your using statements:
Before:
using IronJava;
using IronJava.Core;
using IronJava.Core.AST;
using IronJava.Core.AST.Nodes;
using IronJava.Core.AST.Visitors;After:
using MarketAlly.IronJava;
using MarketAlly.IronJava.Core;
using MarketAlly.IronJava.Core.AST;
using MarketAlly.IronJava.Core.AST.Nodes;
using MarketAlly.IronJava.Core.AST.Visitors;Why This Change?
This change establishes a clear organizational identity for the IronJava project under MarketAlly, providing better discoverability and consistency with other MarketAlly projects.
IronJava v1.1.0 - Java Parser for .NET
🎉 First production-ready release of IronJava - a native .NET library for parsing Java source code.
Highlights
- Full Java 17 parser with strongly-typed AST
- Complete JSON serialization/deserialization
- .NET 9 support
- Cross-platform (Windows, Linux, macOS)
- Comprehensive test coverage
- CI/CD with GitHub Actions
Installation
dotnet add package IronJava --version 1.1.0
See full release notes for detailed changes and improvements.