public final class ResourceType extends Object
ResourceType encapsulates details about a Sling resource type and provides methods for parsing resource type strings.
The following patterns are supported for parsing:
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
@NotNull String |
getResourceLabel()
Returns a resource type's label.
|
@NotNull String |
getType()
Returns the resource type string, without any version information.
|
@Nullable String |
getVersion()
Returns the version, if available.
|
int |
hashCode() |
static @NotNull ResourceType |
parseResourceType(@NotNull String resourceTypeString)
Given a
resourceTypeString, this method will extract a ResourceType object. |
String |
toString() |
@NotNull public @NotNull String getResourceLabel()
@NotNull public @NotNull String getType()
@Nullable public @Nullable String getVersion()
null otherwise@NotNull public static @NotNull ResourceType parseResourceType(@NotNull @NotNull String resourceTypeString)
resourceTypeString, this method will extract a ResourceType object.
The accepted patterns are:
resourceTypeString - the resource type string to parseResourceType objectIllegalArgumentException - if the resourceTypeString cannot be parsedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.