| Modifier and Type | Class and Description |
|---|---|
static class |
Resources.TypeFilter |
| Modifier and Type | Field and Description |
|---|---|
static Resources |
EMPTY_RESOURCES |
| Constructor and Description |
|---|
Resources(java.lang.Iterable<ResourceDescriptor> resourceDescriptors)
Create a resource object with the given resource descriptors.
|
| Modifier and Type | Method and Description |
|---|---|
static Resources |
fromXml(org.dom4j.Element element)
Parses the resource descriptors from the provided plugin XML element and
creates a Resources object containing them.
|
ResourceDescriptor |
getResourceDescriptor(java.lang.String type,
java.lang.String name)
Get a
ResourceDescriptor of a particular type and name. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors()
Get a
List of all the descriptors
. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors(java.lang.String type)
Deprecated.
|
ResourceLocation |
getResourceLocation(java.lang.String type,
java.lang.String name)
Get a
ResourceLocation of a particular type and name. |
public static final Resources EMPTY_RESOURCES
public Resources(java.lang.Iterable<ResourceDescriptor> resourceDescriptors) throws java.lang.IllegalArgumentException
resourceDescriptors - the descriptors which are part of this
resources objectjava.lang.IllegalArgumentException - if the resourceDescriptors list is nullpublic static Resources fromXml(org.dom4j.Element element) throws PluginParseException, java.lang.IllegalArgumentException
element - the plugin or plugin module XML fragment which should not
be nullPluginParseException - if there are two resources with the same
name and type in this element, or another parse error occursjava.lang.IllegalArgumentException - if the provided element is nullpublic java.util.List<ResourceDescriptor> getResourceDescriptors()
ResourcedList of all the descriptors
.
Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
getResourceDescriptors in interface Resourced@Deprecated public java.util.List<ResourceDescriptor> getResourceDescriptors(java.lang.String type)
getResourceDescriptors() and
filter as requiredgetResourceDescriptors in interface Resourcedpublic ResourceLocation getResourceLocation(java.lang.String type, java.lang.String name)
ResourcedResourceLocation of a particular type and name.getResourceLocation in interface Resourcedpublic ResourceDescriptor getResourceDescriptor(java.lang.String type, java.lang.String name)
ResourcedResourceDescriptor of a particular type and name.getResourceDescriptor in interface ResourcedCopyright © 2013 Atlassian. All Rights Reserved.