Class AsmUtil


  • public class AsmUtil
    extends Object
    • Constructor Detail

      • AsmUtil

        public AsmUtil()
    • Method Detail

      • getGeneratedSubClassSignature

        public static String getGeneratedSubClassSignature​(org.jboss.jandex.ClassInfo superClass,
                                                           org.jboss.jandex.Type superClassAsType)
        Returns the Java bytecode generic signature of a hypothetical subclass of given superClass, extending the class's type as denoted by superClassAsType. For example, given this superclass:
         
         public class Foo<R> extends Bar<R> implements List<String> {
         }
         
         
        this method will return <R:Ljava/lang/Object;>LFoo<TR;>;. This is because the hypothetical subclass is considered to be declared like this:
         
         public class MyGeneratedClass<R> extends Foo<R> {
         }
         
         
        Bar and List are ignored, as they are not part of the signature of the hypothetical subclass.
        Parameters:
        superClass - the superclass of the class you want to generate the signature for
        superClassAsType - the superclass type usage in the extends clause of the hypothetical subclass
        Returns:
        generic signature for the subclass