|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.essential.controller.allocation.ResourceNode
public class ResourceNode
A resource node is the framework representation of a resource.
For a resource '/my/simple/path'
the following resource nodes are created:For every resource, a resource node holds information on
| Constructor Summary | |
|---|---|
ResourceNode(String[] pathParts,
int level)
Initializes the resource node. |
|
| Method Summary | |
|---|---|
void |
addResourceMethod(String[] pathParts,
int level,
Class<?> resourceClass,
Method resourceMethod)
Adds a resource method to this node or one of its sub nodes. |
List<ResourceNode> |
findAllSubNodes()
Finds all direct and indirect sub nodes including this node |
List<ResourceNode> |
findAllSubNodesSkippingRoot()
Finds all direct and indirect sub nodes including this node |
ResourceNode |
findResourceNode(String[] pathParts)
Finds the sub node matching the last node of a path represented by the path parts. |
List<ResourceNode> |
findResourceNodesAlongPath(String[] pathParts)
Finds all sub nodes along a path represented by the path parts. |
int |
getLevel()
Gets the level of the node in the node tree with 0 being the root level. |
String |
getPath()
Gets the complete (virtual) path from root to node. |
String |
getPathPart()
Gets the path part. |
Pattern |
getPattern()
Gets the pattern for matching against variable path parts. |
Class<?> |
getResourceClass()
Gets the resource class being responsible for this node. |
List<Method> |
getResourceMethods()
Gets the resource methods associated to this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceNode(String[] pathParts,
int level)
pathParts - The path parts of the original pathlevel - The current level| Method Detail |
|---|
public int getLevel()
public String getPath()
public String getPathPart()
public Pattern getPattern()
public Class<?> getResourceClass()
public List<Method> getResourceMethods()
public void addResourceMethod(String[] pathParts,
int level,
Class<?> resourceClass,
Method resourceMethod)
pathParts - The path partslevel - The current levelresourceClass - The resource classresourceMethod - The resource methodpublic ResourceNode findResourceNode(String[] pathParts)
pathParts - The path parts
public List<ResourceNode> findResourceNodesAlongPath(String[] pathParts)
pathParts - The path parts
public List<ResourceNode> findAllSubNodes()
public List<ResourceNode> findAllSubNodesSkippingRoot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||