Class GenMethod

    • Method Detail

      • getCode

        public CodeAttribute getCode()
        Gives access to the methods code.
        Returns:
        code attribute
      • addException

        public void addException​(Type exception)
        Adds an exception. This corresponds to an entry in the throws clause of the method.
        Parameters:
        exception - an exception type
      • createGenericBridge

        public void createGenericBridge​(Type genericReturnType,
                                        Type... genericArgs)
        Creates a bridge method which calls this method. The bridge method is added to the class. In a bridge method, the generic arguments are casted to the argument types of the original method.
        Parameters:
        genericReturnType - casted return type
        genericArgs - casted argument types