Interface IFlagContainer

    • Method Detail

      • isSimple

        default boolean isSimple()
        Identifies if the field has flags or not, or if it has a complex structure (i.e, model).
        Returns:
        true if the field has no flags or model, or false otherwise
      • getFlagInstanceByName

        @Nullable
        IFlagInstance getFlagInstanceByName​(@NonNull
                                            String name)
        Retrieves a flag instance, by the flag's effective name, that is defined on the containing definition.
        Parameters:
        name - the flag's name
        Returns:
        the matching flag instance, or null if there is no flag matching the specified name
      • hasJsonKey

        default boolean hasJsonKey()
        Indicates if a flag's value can be used as a property name in the containing object in JSON who's value will be the object containing the flag. In such cases, the flag will not appear in the object. This is only allowed if the flag is required, as determined by a true result from IFlagInstance.isRequired(). The IFlagInstance can be retrieved using getJsonKeyFlagInstance().
        Returns:
        true if the flag's value can be used as a property name, or false otherwise
        See Also:
        getJsonKeyFlagInstance()
      • getJsonKeyFlagInstance

        @Nullable
        IFlagInstance getJsonKeyFlagInstance()
        Retrieves the flag instance to use as as the property name for the containing object in JSON who's value will be the object containing the flag.
        Returns:
        the flag instance if a JSON key is configured, or null otherwise
        See Also:
        hasJsonKey()