|
Forge - Shell API 1.2.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.forge.resources.AbstractResource<T>
public abstract class AbstractResource<T>
| Field Summary | |
|---|---|
protected EnumSet<ResourceFlag> |
flags
|
protected Resource<?> |
parent
|
protected ResourceFactory |
resourceFactory
|
| Constructor Summary | |
|---|---|
protected |
AbstractResource(ResourceFactory factory,
Resource<?> parent)
|
| Method Summary | ||
|---|---|---|
protected abstract List<Resource<?>> |
doListResources()
Strategy method for returning child resources. |
|
boolean |
equals(Object obj)
|
|
Set<ResourceFlag> |
getFlags()
|
|
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()
|
|
boolean |
isFlagSet(ResourceFlag flag)
Return true if the given ResourceFlag is set. |
|
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. |
|
|
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. |
|
void |
setFlag(ResourceFlag flag)
Set the given ResourceFlag. |
|
void |
unsetFlag(ResourceFlag flag)
Unset the given ResourceFlag. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.forge.resources.Resource |
|---|
createFrom, delete, delete, exists, getChild, getName, getResourceInputStream, getUnderlyingResourceObject |
| Field Detail |
|---|
protected final ResourceFactory resourceFactory
protected Resource<?> parent
protected EnumSet<ResourceFlag> flags
| Constructor Detail |
|---|
protected AbstractResource(ResourceFactory factory,
Resource<?> parent)
| Method Detail |
|---|
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()
Resource
getFullyQualifiedName in interface Resource<T>public Resource<?> getParent()
Resource
getParent in interface Resource<T>public void setFlag(ResourceFlag flag)
ResourceResourceFlag.
setFlag in interface Resource<T>public void unsetFlag(ResourceFlag flag)
ResourceResourceFlag.
unsetFlag in interface Resource<T>public boolean isFlagSet(ResourceFlag flag)
ResourceResourceFlag is set.
isFlagSet in interface Resource<T>public Set<ResourceFlag> getFlags()
getFlags in interface Resource<T>public <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.
reify in interface Resource<T>protected abstract List<Resource<?>> doListResources()
public List<Resource<?>> listResources()
Resource
listResources in interface Resource<T>public List<Resource<?>> listResources(ResourceFilter filter)
ResourceResourceFilter.
listResources in interface Resource<T>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
Forge - Shell API 1.2.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||