Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
@Retention(CLASS) @Target({TYPE})
public @interface Component
Marks a class the build constructs and injects, once per server.
The build finds the class, works out what its constructor and its
@Autowired members need, and writes the new into the entry point it
generates. Nothing is looked up at run time: there is no container, no
registry and no reflection, and a dependency that cannot be satisfied is a
build error that names the injection point.
@Component
public class Clock {
public long now() { return System.currentTimeMillis(); }
}
Methods
public abstract String value() default "" | The bean’s name, for Qualifier. |
Method details
value
public abstract String value() default ""The bean’s name, for
Qualifier. Empty means the class’s simple name with
its first letter lower-cased, which is Spring’s rule.