Creating custom injectable classes

The injection framework in E4 allows custom injectable classes and services. As well as registering OSGi services, POJOs can be defined and instantiated on demand.

The rules for allowing a type to be instantiated automatically are:

  • It must be a non-abstract class
  • It must have a non-private default constructor
  • It must be annotated with @Creatable

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.