Тёмный

The Full Guide to ANNOTATIONS In Kotlin 

Philipp Lackner
Подписаться 175 тыс.
Просмотров 30 тыс.
50% 1

In this video I'll show you how you can leverage annotations in Kotlin and process them yourself.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/premium-courses...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/newsletter
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/philipplackner/Ann...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/philipplackner
You like my free content? Here you can buy me a coffee:
www.buymeacoffee.com/philippl...

Опубликовано:

 

28 янв 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@varunguptavarun
@varunguptavarun Год назад
I was looking forward for a detailed video on annotations. I haven't even watched it yet but already commenting. Thanks for it anyway.
@OlafAchthoven
@OlafAchthoven Год назад
Nice video! The Authenticated annotation is really useful. In the birthdate example, the code is looping all fields, and then all annotations, but in the innerloop it is checking one specific annotation. This means that it will check the annotation multiple times if you have multiple annotations. The loop over the annotations is not needed.
@mr.anderson3124
@mr.anderson3124 Год назад
Indeed Mr.Achthoven! ;)
@jackli1924
@jackli1924 Год назад
nice video!you always teach and explain technology so concise and clearly,thanks a lot!
@chndraja
@chndraja Год назад
Hi Philipp , Thank you for the content on your channel, this helped me a lot.👍👍👍 can you make video on reflection and how it works.
@hosenalzuhile3019
@hosenalzuhile3019 Год назад
thank you very much for your perfect examples and explanations .. can you make a video on processing these annotations using Processor
@dorsolomon8151
@dorsolomon8151 Год назад
It would be cool to see Annotations with annotations proccessing / KAPT / KCP
@atulkumar-bb7vi
@atulkumar-bb7vi Год назад
Nice explanation... Thanks!
@royss7656
@royss7656 Год назад
Awsome video, how your logging interceptor returns formated json instead of plain text json ?
@nyanziashraf6983
@nyanziashraf6983 Год назад
Hey Philipp can you please make a video about SearchableActivity. The Google docs are shallow in explanation.
@flowzk921
@flowzk921 Год назад
Great Video!
@dewetvanrooyen8458
@dewetvanrooyen8458 3 месяца назад
So complex , wow . Okay keep learning then. Thanks for posting.
@codebidhya
@codebidhya Год назад
Is there a way to write Annotation logic in the annotation class itself? You added the logic check I the init{} at first. Instead of that checks for each class I create. Cannot I add the logic in Annotation class itself? BTW enjoyed the content much!
@ChrisAthanas
@ChrisAthanas Год назад
I made an extension function for Any and I call it from unit block to run the annotation validation code instead of within the data class unit block I have it on my git hub. Realityexpander
@aabhishek4911
@aabhishek4911 Год назад
You have to write an annotation processor for that , the way annotations have been used in this video is very rudimentary and not viable
@noahsragow2892
@noahsragow2892 Год назад
Look up Kotlin Symbol Processor
@theredd1703
@theredd1703 2 месяца назад
Thanks!
@bhagavanreddy104
@bhagavanreddy104 10 месяцев назад
Thanks Philipp
@mehdiparsaei1867
@mehdiparsaei1867 Год назад
Perfect as always. Do you have any videos about KSP?
@samadMahmoodi
@samadMahmoodi Год назад
thanks, what is your androidstudio theme?
@robchr
@robchr Год назад
Annotations are really powerful but sometimes there are prettier ways with Kotlin. For example, you could have used a value class to achieve the same thing without throwing runtime exceptions. Having a value class with a private constructor and a factory companion method that returns either the inline class instance or null if the value does not match the constraint. The kotlin type checker can then ensure that the constraint only has to be checked once during construction and doesn't require having the value boxed when passed as a parameter.
@ChrisAthanas
@ChrisAthanas Год назад
Can you give us a Reference to your solution so we can contrast and compare your proposed technique?
@robchr
@robchr Год назад
​@@ChrisAthanas I would but youtube comments don't allow linking to other sites.
@robchr
@robchr Год назад
@@ChrisAthanas zirman/7d68ee7fa04766b53d2d0e37c6e0b144
@ChrisAthanas
@ChrisAthanas Год назад
@@robchr very interesting, thanks for posting!
@ChrisAthanas
@ChrisAthanas Год назад
I left a comment on the gist
@jitendrarathore7331
@jitendrarathore7331 Год назад
I have some questions, please tell me what is best practices for these question. 1. How to pass token dynamically for retrofit using share prefence and hilt.
@schnaps1981
@schnaps1981 Год назад
awesome!
@bhuvaneshwaranm7290
@bhuvaneshwaranm7290 Год назад
Thanks
@Leandro-zo4kp
@Leandro-zo4kp Год назад
Nice !! tks!! S2
@forest__fires
@forest__fires Год назад
HI Philip i have a one question I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread. Why that is printing... How to manage with threads and CoroutineScope in real time sample. please.
@ChrisAthanas
@ChrisAthanas Год назад
Are you running in debug mode? Try running without debug and see if the messages still appear
@forest__fires
@forest__fires Год назад
@@ChrisAthanas its appear in normal.
@a_human_on_earth
@a_human_on_earth 3 месяца назад
Nice video! But this is kinda tough I think.. Like we need to find out or search the class.. like if we have a nested data class then it is bit difficult for filed annotation right..! Anyway nice.
@djfahed3002
@djfahed3002 11 месяцев назад
Well, the way birthDay field is checked is very ugly and I would never use it like this, it is not useful at all. The useful way I think would be that the annotation class itself doing the check, and this check would be applicable to any other field from other classes, not just the User class. But thanks for the video any way.
@barracuda7361
@barracuda7361 4 месяца назад
i thought that's how annotation works, but after watch this video i realized that annotation is just... marker? i think.
@forest__fires
@forest__fires Год назад
Currently Im asking my doubts to CharGpt Ai.. Its much more efficiently answered.
@ChrisAthanas
@ChrisAthanas Год назад
Knowing what to ask and what the answer means will become the new skill set Until the skill set is completely subsumed
@excalibur8147
@excalibur8147 Год назад
@@ChrisAthanas Knowing what to ask is way easier than knowing how to search for info.
@ChrisAthanas
@ChrisAthanas Год назад
@@excalibur8147 I would.say all skills are needed in the player vs player new universe
@aviator1472
@aviator1472 8 месяцев назад
I haven't understanded anything from this video.
@barracuda7361
@barracuda7361 4 месяца назад
youre not alone
Далее
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 796 тыс.
15 Python Libraries You Should Know About
14:54
Просмотров 375 тыс.
Make Your Code Clean With the SOLID Principles
18:24
Просмотров 96 тыс.
Generics: The most intimidating TypeScript feature
18:19
All Rust string types explained
22:13
Просмотров 155 тыс.