mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 04:37:32 +07:00
GitOrigin-RevId: 36ccd2c540a08614d34c97badee31b2d264cdd12
20 lines
472 B
Java
20 lines
472 B
Java
import java.lang.reflect.Field;
|
|
|
|
class Reflection {
|
|
void reflectionAccess(BeanWithWeirdFields someBean) throws NoSuchFieldException {
|
|
Field theField = someBean.getClass().getDeclaredField("UUID");
|
|
}
|
|
|
|
void testOther() {
|
|
BeanWithWeirdFields someBean = new BeanWithWeirdFields();
|
|
System.out.println(someBean.UUID);
|
|
}
|
|
|
|
static class BeanWithWeirdFields {
|
|
private String UUID;
|
|
|
|
public void setUUID(String UUID) {
|
|
this.UUID = UUID;
|
|
}
|
|
}
|
|
} |