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
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

APACHE COMMONS / CATATAN</>
Apache Commons08 Nov 2007

How do I determine bean’s property type?

Using the PropertyUtils.getPropertyType() we can determine the bean property type. This method return a Class object of bean’s property type. package org.kodejava.commons.beanutils; import org.apache.commons.beanutils.PropertyUtils; import org.kodejava.commons.beanutils.support.Record; public class PropertyType { public static void main(String[] args) { Record record = new Record(); record.setTitle("Magical Mystery Tour"); try { /* * Using PropertyUtils.getPropertyType() to d...

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons03 Nov 2007

How do I read mapped bean’s property value?

In this example you’ll see how to read mapped property value of a bean. We use PropertyUtils.getMappedProperty() method the read the mapped property of the Record object that consist of Track objects. 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; import java.util.Map; public class ReadMapProperty { pu...

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons31 Okt 2007

How do I read indexed bean’s property value?

In this example you’ll see how to read an indexed property of an object such as List or array. Using the PropertyUtils.getIndexedProperty() method we can do it easily. This method take the bean and the name of indexed property including the element to be read. Let’s see the example below for more details. package org.kodejava.commons.beanutils; […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons27 Okt 2007

How do I read bean’s nested property value?

In this example you’ll see how to read bean’s nested property, we’ll use PropertyUtils.getNestedProperty() method. To test we will create three classes, Track and Artist for our beans and ReadNestedProperty as a main program to run. The Track class will contain a property of an Artist object. Using the PropertyUtils.getNestedProperty() method we want to get […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons27 Okt 2007

How do I read bean’s property value?

In this example we will learn how to use PropertyUtils.getSimpleProperty() method to read bean’s property value. To test this method we will create a simple class called Track for our bean. The Track class have some properties such as id, title and duration. The PropertyUtils.getSimpleProperty() reads our bean property by accessing the bean’s getter method. […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons24 Okt 2007

How do I find text between two strings?

In this example we’ll use the StringUtils.substringBetween() method. Here we’ll extract the title and body of our HTML document. Let’s see the code. package org.kodejava.commons.lang; import java.util.Date; import org.apache.commons.lang3.StringUtils; public class NestedString { public static void main(String[] args) { String helloHtml = "<html>" + "<head>" + " <title>Hello World from Java</title>" + "<body>" + "Hello, […]

Wayan · 1 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.