From de61895a24bcb310252176b76912be8c3712096d Mon Sep 17 00:00:00 2001 From: Michael Hoffer Date: Tue, 19 Mar 2024 12:55:34 +0100 Subject: [PATCH] https://github.com/miho/VMF/issues/55 --- .../eu/mihosoft/vmf/vmtemplates/interface/builder.vm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/resources/eu/mihosoft/vmf/vmtemplates/interface/builder.vm b/core/src/main/resources/eu/mihosoft/vmf/vmtemplates/interface/builder.vm index cbb5c47..0636bf0 100644 --- a/core/src/main/resources/eu/mihosoft/vmf/vmtemplates/interface/builder.vm +++ b/core/src/main/resources/eu/mihosoft/vmf/vmtemplates/interface/builder.vm @@ -151,6 +151,14 @@ #foreach( $t in $type.allInheritedTypes ) /** * Applies all properties from the specified object to this builder. + * + *

NOTE: + * This method may throw a class cast exception if the interface of the specified object + * contains properties with @GetterOnly annotations that return a supertype of the + * actual property type of the type this builder is for and if the specified object + * this builder is applying from, is not an instance of the property type in question, + * e.g., if a cast from the supertype to the property type is not possible. + *

* @param o object to apply properties from * @return this builder * @see #[[#]]#applyTo($type.typeName)