Is there a way for the compiler and IDE (for autocompletion) to know about a method that will be generated and available on runtime? Example: I have an annotation that will generate a method and another that will create a companion object in case the class doesn't have one. Is possible for that classes that are annotated with those annotations, to have autocompletion and know on compile time about those methods? Or is necessary to create an IDE plugin? Right know is not possible to create an extension on the companion object without creating it explicitly.