Skip to content

Commit

Permalink
Specify generic type in type *Meta classes to improve compilation per…
Browse files Browse the repository at this point in the history
…formance (#757)

* Add generics to Meta class

* Add generics to improve compilation performance
  • Loading branch information
hugohills-regnosys authored May 22, 2024
1 parent 3c2e84a commit f5cb173
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ class ModelMetaGenerator {
public «List»<«Validator»<? super «dataClass»>> dataRules(«ValidatorFactory» factory) {
return «Arrays».asList(
«FOR r : conditions SEPARATOR ','»
factory.create(«r.containingClassNamespace.condition».«r.ruleName.toConditionJavaType».class)
«val containingClassName = r.containingClassNamespace + '.' + r.className»
«val conditionClassName = r.containingClassNamespace.condition + '.' + r.ruleName.toConditionJavaType»
factory.<«containingClassName»>create(«conditionClassName».class)
«ENDFOR»
);
}
Expand All @@ -76,7 +78,7 @@ class ModelMetaGenerator {
«IF !qualifierFuncs.nullOrEmpty»
return Arrays.asList(
«FOR qf : qualifierFuncs SEPARATOR ','»
factory.create(«qf.toFunctionJavaClass».class)
factory.<«dataClass»>create(«qf.toFunctionJavaClass».class)
«ENDFOR»
);
«ELSE»
Expand Down

0 comments on commit f5cb173

Please sign in to comment.