public abstract class AbstractResource<T> extends org.jboss.forge.facets.AbstractFaceted<ResourceFacet> implements Resource<T>
| Modifier and Type | Field and Description |
|---|---|
protected Resource<?> |
parent |
protected ResourceFactory |
resourceFactory |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource(ResourceFactory factory,
Resource<?> parent) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<Resource<?>> |
doListResources()
Strategy method for returning child resources.
|
boolean |
equals(Object obj) |
String |
getFullyQualifiedName()
Return the fully qualified name of the resource (if applicable).
|
Resource<?> |
getParent()
Get the parent of the current resource.
|
ResourceFactory |
getResourceFactory()
Return the
ResourceFactory with which this Resource was created. |
int |
hashCode() |
List<Resource<?>> |
listResources()
Return a list of child resources of the current resource.
|
List<Resource<?>> |
listResources(ResourceFilter filter)
Return a list of child resources of the current resource matching the given
ResourceFilter. |
<R extends Resource<?>> |
reify(Class<R> type)
Ask this
Resource if it is actually a resource of the given type; if it is, return a new reference to the
resource as the given type, otherwise return null. |
<F extends ResourceFacet> |
supports(F facet) |
getFacet, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, uninstallclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreateFrom, delete, delete, exists, getChild, getName, getResourceInputStream, getUnderlyingResourceObjectprotected final ResourceFactory resourceFactory
protected Resource<?> parent
protected AbstractResource(ResourceFactory factory, Resource<?> parent)
public ResourceFactory getResourceFactory()
ResourceResourceFactory with which this Resource was created. If no factory was used, return
null.getResourceFactory in interface Resource<T>public String getFullyQualifiedName()
ResourcegetFullyQualifiedName in interface Resource<T>public Resource<?> getParent()
Resourcepublic <R extends Resource<?>> R reify(Class<R> type)
ResourceResource if it is actually a resource of the given type; if it is, return a new reference to the
resource as the given type, otherwise return null.protected abstract List<Resource<?>> doListResources()
public List<Resource<?>> listResources()
ResourcelistResources in interface Resource<T>public List<Resource<?>> listResources(ResourceFilter filter)
ResourceResourceFilter.listResources in interface Resource<T>public <F extends ResourceFacet> boolean supports(F facet)
supports in interface org.jboss.forge.facets.Faceted<ResourceFacet>Copyright © 2013 JBoss by Red Hat. All Rights Reserved.