Tag Archives: Reflection

Take a look at the Java Reflection

Well, before taking in-deep look at reflection, please keep in mind that if it is imposible to use other method for operation, we should use this way rather than the reflection.

So, what is reflection? In the computer sience, reflection is the feature allows programs examine or modify runtime behaviour and structure of programs in the JVM. In Java language, reflection allows programs discover informations about classes, fields, interfaces and methods of loaded classes, and use them without any security restrictions.

Here is a quick example to you how Java reflection works :

reflection_sample_1 Continue reading

Exploring for Java Annotation

1. Introduction

Annotations, called metadata, is additional information that embed into java source code file, and it can be used by complilers or developement tools for some purposes :

Informations for compiler. Annotations can be used by compiler to detect errors or superess warning.

Compile-time and deployment-time processing. IDEs can use annatations to generate code, XML file, ….

Runtime processing. Some annotations ‘re available to retrieve at runtime. Continue reading