vertx-codegen icon indicating copy to clipboard operation
vertx-codegen copied to clipboard

Handlers are reported as CLASS_API

Open codepitbull opened this issue 6 years ago • 7 comments

When using type.kind for Handlers (e.g. io.vertx.ext.web.handler.CookieHandler) the kind is reported to be CLASS_API instead of CLASS_HANDLER.

codepitbull avatar Feb 02 '18 23:02 codepitbull

can you give an example of code that declares this type ?

vietj avatar Feb 03 '18 07:02 vietj

My assumption is that during codegen the io.vertx.ext.web.handler.CookieHandler should be reported as CLASS_HANDLER, it is reported to be CLASS_API. What kind of example should I provide?

codepitbull avatar Feb 07 '18 09:02 codepitbull

no it should be CLASS_API

however on ApiTypeInfo you do have the isHandler() method (accessible with handler property in templates) and also the getHandlerArg() method that you can use to achieve this effect.

vietj avatar Feb 07 '18 09:02 vietj

Argh, you are right. But what sense does CLASS_HANDLER make if all @VertxGen annotated handlers are CLASS_API? Maybe we could clarify that in the docs.

codepitbull avatar Feb 07 '18 09:02 codepitbull

CLASS_HANDLER == really the Handler class CLASS_API == anything annotated with vertxgen

vietj avatar Feb 07 '18 10:02 vietj

can you make a PR for doc ?

vietj avatar Feb 07 '18 10:02 vietj

Will do when I get home.

codepitbull avatar Feb 07 '18 12:02 codepitbull