Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
@Retention(CLASS) @Target({TYPE, METHOD})
public @interface Profile
Constructs this bean only when a profile is active.
@Profile("dev") is active under CN1_PROFILE=dev; @Profile("!prod") is
active under every profile but prod; several values mean any of them. The
profile is the deployment’s to choose, so this is the one decision the build
cannot make: it becomes a single if in the generated start-up code. The build
still checks that every bean needing this one is covered either way – by
another bean of the same type under the other profiles, or by being
conditional itself.
Methods
public abstract String[] value() | The profiles, each optionally negated with !. |
Method details
value
public abstract String[] value()The profiles, each optionally negated with
!.