August 2016
Beginner to intermediate
458 pages
10h 56m
English
POJOs can be instantiated and made available in the E4 context, such that they can be injected into other classes or created on demand. This allows an application to be built in a flexible manner without tight coupling between services.
StringService in the com.packtpub.e4.application package with a @Creatable annotation, and a process method that takes a string and returns an uppercase version:import org.eclipse.e4.core.di.annotations.Creatable;
@Creatable
public class StringService {
public String process(String string) {
return string.toUpperCase();
}
}StringService to the Rainbow class:@Inject private StringService stringService;
stringService ...Read now
Unlock full access