java - Reflection and annotation that doesn't define -
i have programmed app gets name of entity class , based on it, makes ui. doing created few annotations , used them entity fields. 1 of these annotations @label holds name field , others @inttype, @stringtype,... hold field types.
i want know, if write entity creating ui doesn't have 1 or both of annotations, how handle these exception? try/catch block?
you can create custom exception anotationnotfoundexception, , throw command anotations of entity. grab in main method of app. can log somewhere ui or log files.
java reflection annotations
No comments:
Post a Comment