Session: The Art of Metaprogramming in Java

Wednesday 14.10 - 15.00
Room: Honey Badger

Metaprogramming is the dirty little secret behind the success of many Java frameworks such as Spring and Struts2, and forms the backbone of many of the most fundamental APIs across the JEE technology stack. This session aims to introduce the topic and highlight, with code examples, the different mechanisms and techniques to take advantage of this underused feature of the Java Programming Language. This session will adopt a learn-by-example approach that combines the philosophy and theory behind metaprogramming with concrete code examples. No previous knowledge or exposure to the topic is required, but an intermediate understanding of Java SE is expected.

Outline:

I. Introduction
What is Metaprogramming?
Metadata Formats?
Benefit?
Example: (Spring, etc…)
II. Metaprgamming In Java
Java Annotations – JSR 175
Annotation Processing
Compile time:
Pluggable Annotation Processing API (JSR 269)
Runtime:
Java Reflection API
Libraries: Reflections, FEST-Reflect, etc…
Byte Code manipulation
ASM, CGLib, and Javassist
Project Averroes
III. Best Practices and Design Patterns
A step-by-step code example
The metadata
Metadata processing
Constructing a metamodel
Making sense of the metamodel

Tags: Fun Hands on Java

Expectations

No previous knowledge or exposure to the topic is required, but an intermediate understanding of Java SE is expected.

Abdelmonaim RemaniAbdelmonaim Remani

A software developer and technology enthusiast at heart and by profession. Particularly interested in technology evangelism and enterprise software development and architecture. Experienced in Java Enterprise Applications and a wide range of related technologies. President and Founder of a number of organizations namely The NorCal Java User Group, The Silicon Valley Dart Meetup, and The Silicon Valley Spring User Group. Abdel is a frequent speaker at a number of developer conferences including JavaOne, JAX Conf, and OsCon, and many user groups and community events.