flozano commented on issue #5925:
URL: 
https://github.com/apache/incubator-kie-drools/issues/5925#issuecomment-2107350075

   from byte-buddy, it very explicitly supports subclasses of generic parents:
   
   ```java
       /**
        * <p>
        * Creates a new builder for subclassing the provided type. If the 
provided type is an interface, a new class implementing
        * this interface type is created.
        * </p>
        * <p>
        * When extending a class, Byte Buddy imitates all visible constructors 
of the subclassed type and sets them to be {@code public}.
        * Any constructor is implemented to only invoke its super type 
constructor of equal signature. Another behavior can be specified by
        * supplying an explicit {@link ConstructorStrategy} by {@link 
ByteBuddy#subclass(TypeDefinition, ConstructorStrategy)}.
        * </p>
        * <p>
        * <b>Note</b>: This methods implements the supplied types <i>as is</i>, 
i.e. any {@link TypeDescription} values are implemented
        * as raw types if they declare type variables.
        * </p>
        * <p>
        * <b>Note</b>: Byte Buddy does not cache previous subclasses but will 
attempt the generation of a new subclass. For caching
        * types, a external cache or {@link TypeCache} should be used.
        * </p>
        *
        * @param superType The super class or interface type to extend. The 
type must be a raw type or parameterized type. All type
        *                  variables that are referenced by the generic type 
must be declared by the generated subclass before creating
        *                  the type.
        * @return A type builder for creating a new class extending the 
provided class or interface.
        */
       public DynamicType.Builder<?> subclass(TypeDefinition superType) {
           return subclass(superType, 
ConstructorStrategy.Default.IMITATE_SUPER_CLASS_OPENING);
       }
   ```
   
   `superType The super class or interface type to extend. The type must be a 
raw type or parameterized type. All type variables that are referenced by the 
generic type must be declared by the generated subclass before creating the 
type.`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to