Package ru.yojo.codegen.mapper
Class Helper
java.lang.Object
ru.yojo.codegen.mapper.Helper
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of schema names excluded from field population due to inheritance.Returns the set of schema names to be preserved (excluded from removal).Returns the map of inner schemas discovered during mapping.Returns the set of schema names marked for removal after processing.Returns whether the current context is mapping from messages.Returns whether the current context is mapping from schemas.voidsetExcludeInheritanceSchemas(Set<String> excludeInheritanceSchemas) Sets the set of schema names to exclude from inheritance-based field filling.voidsetExcludeRemoveSchemas(Set<String> excludeRemoveSchemas) Sets the set of schema names to exclude from removal.voidsetInnerSchemas(Map<String, Object> innerSchemas) Sets the map of inner schemas.voidsetIsMappedFromMessages(Boolean isMappedFromMessages) Sets the flag indicating mapping originates from messages.voidsetIsMappedFromSchemas(Boolean isMappedFromSchemas) Sets the flag indicating mapping originates from schemas.voidsetRemoveSchemas(Set<String> removeSchemas) Sets the set of schema names to be removed.
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
isMappedFromMessages
Returns whether the current context is mapping from messages.- Returns:
trueif mapping originates from message processing
-
setIsMappedFromMessages
Sets the flag indicating mapping originates from messages.- Parameters:
isMappedFromMessages- flag value
-
isMappedFromSchemas
Returns whether the current context is mapping from schemas.- Returns:
trueif mapping originates from schema processing
-
setIsMappedFromSchemas
Sets the flag indicating mapping originates from schemas.- Parameters:
isMappedFromSchemas- flag value
-
getRemoveSchemas
Returns the set of schema names marked for removal after processing.- Returns:
- mutable set of schema names
-
setRemoveSchemas
Sets the set of schema names to be removed.- Parameters:
removeSchemas- set of schema names
-
getExcludeRemoveSchemas
Returns the set of schema names to be preserved (excluded from removal).- Returns:
- mutable set of schema names
-
setExcludeRemoveSchemas
Sets the set of schema names to exclude from removal.- Parameters:
excludeRemoveSchemas- set of schema names
-
getExcludeInheritanceSchemas
Returns the set of schema names excluded from field population due to inheritance.- Returns:
- mutable set of schema names
-
setExcludeInheritanceSchemas
Sets the set of schema names to exclude from inheritance-based field filling.- Parameters:
excludeInheritanceSchemas- set of schema names
-
getInnerSchemas
Returns the map of inner schemas discovered during mapping.- Returns:
- concurrent map: schema name → schema definition
-
setInnerSchemas
Sets the map of inner schemas.- Parameters:
innerSchemas- map of inner schemas
-