@Immutable
public class ResourceType
extends java.lang.Object
Experimental extension to declare types of resources.
Since 3.0, ResourceType object can declare properties that give information about the capabilities of the
resource type. Those properties may be used, of instance, to adapt the Web UI according to the type of
the resource being displayed.
Currently, the following properties can be defined:
Modifier and Type | Class and Description |
---|---|
static class |
ResourceType.Builder
Builder used to create
ResourceType objects. |
Modifier and Type | Method and Description |
---|---|
static ResourceType.Builder |
builder(java.lang.String qualifier)
Creates a new
ResourceType.Builder |
boolean |
equals(java.lang.Object o) |
boolean |
getBooleanProperty(java.lang.String key)
Returns the value of the property for this resource type.
|
java.lang.String |
getIconPath()
Returns the relative path of the icon used to represent the resource type
|
java.lang.String |
getQualifier()
Qualifier is the unique key.
|
java.lang.String |
getStringProperty(java.lang.String key)
Returns the value of the property for this resource type.
|
int |
hashCode() |
boolean |
hasProperty(java.lang.String key) |
boolean |
hasSourceCode()
Tells whether resources of this type has source code or not.
|
java.lang.String |
toString() |
public java.lang.String getQualifier()
public java.lang.String getIconPath()
public boolean hasSourceCode()
public boolean hasProperty(java.lang.String key)
public java.lang.String getStringProperty(java.lang.String key)
public boolean getBooleanProperty(java.lang.String key)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static ResourceType.Builder builder(java.lang.String qualifier)
ResourceType.Builder