Package com.codename1.backend.annotations


package com.codename1.backend.annotations

Annotations that turn an ordinary class into an HTTP or websocket endpoint.

Mark a class RestController and its methods with GetMapping, PostMapping and the other verb mappings; bind the request to parameters with PathVariable, RequestParam, RequestHeader and RequestBody. The build reads these annotations and generates the router, so routing is decided at build time rather than by reflection when the server starts. The names follow Spring's, so the shape reads without learning it first.

Server code: these annotations are read by the backend build and mean nothing in an app.

  • Annotation Types
    Class
    Description
    Maps an HTTP DELETE to this method.
    Marks a class the backend processors wrote, so a later pass knows its own work.
    Maps an HTTP GET to this method.
    Traces this server with OpenTelemetry.
    Maps an HTTP PATCH to this method.
    Binds a {name} segment of the path to this parameter.
    Maps an HTTP POST to this method.
    Maps an HTTP PUT to this method.
    Binds the decoded request body to this parameter.
    Binds a request header to this parameter.
    A path, and optionally a verb, for a controller or one of its methods.
    Binds a query parameter to this parameter.
    The status this method answers with when it returns normally.
    Marks a class whose methods answer HTTP requests.
    Marks a com.codename1.backend.WebSocket as the endpoint for a path.