Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CORE API / CATATAN</>
Core API06 Jul 2009

How do I get all annotations?

To obtains all annotations for classes, methods, constructors, or fields we use the getAnnotations()method. This method returns an array of Annotation In the following example we tried to read all annotations from the sayHi() method. First we need to obtain the method object itself. Because the sayHi() method has parameters, we need to pass not […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API05 Jul 2009

How do I obtain annotations at runtime using reflection?

This example demonstrate how to obtain annotations of a class and methods. We use the reflection API to get class and method information from where we can read information about annotation attached to the class or the method. package org.kodejava.lang.annotation; import java.lang.annotation.Annotation; import java.lang.reflect.Method; @HelloAnnotation(value = "Hello", greetTo = "Universe") public class GettingAnnotation { public […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API30 Jun 2009

How do I annotate a class or method?

This example show you how to use the HelloAnnotation annotation on the previous example code, How do I create a simple annotation?. We add the HelloAnnotation annotation to our class and its methods. package org.kodejava.lang.annotation; @HelloAnnotation(value = "Good Morning", greetTo = "Universe") public class HelloAnnotationExample { public static void main(String[] args) { HelloAnnotationExample hello = […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API27 Jun 2009

How do I create a simple annotation?

Metadata is a way to add some supplement information to the source code. This information is called annotation will not change how the program runs. This metadata can be used by other tools such as source code generator for instance to generate additional code at the runtime. Or it will be used by a dependency […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons23 Jun 2009

How do I set mapped property value of a bean?

This example demonstrate how to use PropertyUtils.setMappedProperty() method to modify a Map typed property value of a bean. To set the property we need to pass bean instance, property name, map key and map value to PropertyUtils.setMappedProperty() method. package org.kodejava.commons.beanutils; import org.apache.commons.beanutils.PropertyUtils; import org.kodejava.commons.beanutils.support.Track; import org.kodejava.commons.beanutils.support.Record; import java.util.HashMap...

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons20 Jun 2009

How do I set indexed property value of a bean?

In this example we show how to set the value of an indexed property. In the code below we modified the value of an array type. We’ll change the second colors of MyBean‘s colors property. We do it in the same way as we are using the PropertyUtils.setSimpleProperty method. For indexed property we use the […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.