Enum DebugFlag

    • Enum Constant Detail

      • LAYOUT

        public static final DebugFlag LAYOUT
        displays layout information
      • MDEV

        public static final DebugFlag MDEV
        display mobile device info as inline HTML
      • MDEVC

        public static final DebugFlag MDEVC
        display mobile device info as HTML comments
    • Field Detail

      • REQUEST_ATTRIBUTE_NAME

        public static final String REQUEST_ATTRIBUTE_NAME
        name of the request attribute
      • DEBUG_PARAM_NAME

        public static final String DEBUG_PARAM_NAME
        Default parameter name of the debug request parameter
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static DebugFlag[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DebugFlag c : DebugFlag.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DebugFlag valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromRequest

        public static Set<DebugFlag> fromRequest​(ServletRequest req)
        Returns the debug mode for the current request, if set in the request attributes
        Parameters:
        req - request
        Returns:
        debug mode, empty Set if not defined in request attributes
      • fromRequestParameter

        public static Set<DebugFlag> fromRequestParameter​(ServletRequest request,
                                                          String parameterName)
        Return the current set of debug modes defined by supplied request parameter. If the set was already stored in the request attributes, return that.
        Parameters:
        request - the current request
        parameterName - the (multi-valued) request parameter that defines debug modes
        Returns:
        the Set of DebugFlag, from request attributes if present, else computed, empty Set if no debug modes defined.