Class Helper

java.lang.Object
ru.yojo.codegen.mapper.Helper

public class Helper extends Object
Shared mutable state container used during schema/message mapping.

Tracks:

  • Which schemas should be excluded from generation (e.g., referenced via $ref)
  • Inner schemas discovered during processing (e.g., enums, nested DTOs)
  • Context flags for mapper logic (e.g., mapping origin: messages vs schemas)

Instances are typically held in ProcessContext and shared across SchemaMapper and MessageMapper.

  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • isMappedFromMessages

      public Boolean isMappedFromMessages()
      Returns whether the current context is mapping from messages.
      Returns:
      true if mapping originates from message processing
    • setIsMappedFromMessages

      public void setIsMappedFromMessages(Boolean isMappedFromMessages)
      Sets the flag indicating mapping originates from messages.
      Parameters:
      isMappedFromMessages - flag value
    • isMappedFromSchemas

      public Boolean isMappedFromSchemas()
      Returns whether the current context is mapping from schemas.
      Returns:
      true if mapping originates from schema processing
    • setIsMappedFromSchemas

      public void setIsMappedFromSchemas(Boolean isMappedFromSchemas)
      Sets the flag indicating mapping originates from schemas.
      Parameters:
      isMappedFromSchemas - flag value
    • getRemoveSchemas

      public Set<String> getRemoveSchemas()
      Returns the set of schema names marked for removal after processing.
      Returns:
      mutable set of schema names
    • setRemoveSchemas

      public void setRemoveSchemas(Set<String> removeSchemas)
      Sets the set of schema names to be removed.
      Parameters:
      removeSchemas - set of schema names
    • getExcludeRemoveSchemas

      public Set<String> getExcludeRemoveSchemas()
      Returns the set of schema names to be preserved (excluded from removal).
      Returns:
      mutable set of schema names
    • setExcludeRemoveSchemas

      public void setExcludeRemoveSchemas(Set<String> excludeRemoveSchemas)
      Sets the set of schema names to exclude from removal.
      Parameters:
      excludeRemoveSchemas - set of schema names
    • getExcludeInheritanceSchemas

      public Set<String> getExcludeInheritanceSchemas()
      Returns the set of schema names excluded from field population due to inheritance.
      Returns:
      mutable set of schema names
    • setExcludeInheritanceSchemas

      public void setExcludeInheritanceSchemas(Set<String> excludeInheritanceSchemas)
      Sets the set of schema names to exclude from inheritance-based field filling.
      Parameters:
      excludeInheritanceSchemas - set of schema names
    • getInnerSchemas

      public Map<String,Object> getInnerSchemas()
      Returns the map of inner schemas discovered during mapping.
      Returns:
      concurrent map: schema name → schema definition
    • setInnerSchemas

      public void setInnerSchemas(Map<String,Object> innerSchemas)
      Sets the map of inner schemas.
      Parameters:
      innerSchemas - map of inner schemas