Package org.gnome.glib
Enum Class UriFlags
- All Implemented Interfaces:
Serializable,Comparable<UriFlags>,Constable,Enumeration
@Generated("io.github.jwharm.JavaGI")
public enum UriFlags
extends Enum<UriFlags>
implements Enumeration
Flags that describe a URI.
When parsing a URI, if you need to choose different flags based on the type of URI, you can use g_uri_peek_scheme() on the URI string to check the scheme first, and use that to decide what flags to parse it with.
- Since:
- 2.66
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen parsing a URI, this indicates that%-encoded characters in the userinfo, path, query, and fragment fields should not be decoded.Same asENCODED, for the fragment only.Same asENCODED, for the path only.Same asENCODED, for the query field only.The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by;.The userinfo field may contain a password, which will be separated from the username by:.The host component should not be assumed to be a DNS hostname or IP address (for example, forsmbURIs with NetBIOS hostnames).No flags set.Parse the URI more relaxedly than the RFC 3986 grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources.A scheme-based normalization will be applied. -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()Get the numeric value of this enumof(int flags) Create a newEnumSet<UriFlags>for the provided bitfieldof(MemorySegment address) Create a newEnumSet<UriFlags>for the bitfield in the provided memory address.static UriFlagsReturns the enum constant of this class with the specified name.static UriFlags[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No flags set. -
PARSE_RELAXED
Parse the URI more relaxedly than the RFC 3986 grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources. This is also needed for some obscure URI schemes where;separates the host from the path. Don’t use this flag unless you need to. -
HAS_PASSWORD
The userinfo field may contain a password, which will be separated from the username by:. -
HAS_AUTH_PARAMS
The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by;. -
ENCODED
When parsing a URI, this indicates that%-encoded characters in the userinfo, path, query, and fragment fields should not be decoded. (And likewise the host field ifNON_DNSis also set.) When building a URI, it indicates that you have already%-encoded the components, and soGUrishould not do any encoding itself. -
NON_DNS
The host component should not be assumed to be a DNS hostname or IP address (for example, forsmbURIs with NetBIOS hostnames). -
ENCODED_QUERY
-
ENCODED_PATH
-
ENCODED_FRAGMENT
-
SCHEME_NORMALIZE
A scheme-based normalization will be applied. For example, when parsing an HTTP URI changing omitted path to/and omitted port to80; and when building a URI, changing empty path to/and default port80). This only supports a subset of known schemes. (Since: 2.68)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValuein interfaceEnumeration- Returns:
- the enum value
-
of
-
of
Create a newEnumSet<UriFlags>for the bitfield in the provided memory address.- Parameters:
address- the memory address holding a bitfield value- Returns:
- the EnumSet for the bitfield in the provided memory address
-