Forge - Resource Addon API 2.0.0.Alpha3

org.jboss.forge.resource
Class VirtualResource<T>

java.lang.Object
  extended by org.jboss.forge.facets.AbstractFaceted<ResourceFacet>
      extended by org.jboss.forge.resource.AbstractResource<T>
          extended by org.jboss.forge.resource.VirtualResource<T>
All Implemented Interfaces:
org.jboss.forge.facets.Faceted<ResourceFacet>, Resource<T>

public abstract class VirtualResource<T>
extends AbstractResource<T>

An abstract implementation of a virtual resource handle.

Author:
Lincoln Baxter, III

Field Summary
 
Fields inherited from class org.jboss.forge.resource.AbstractResource
parent, resourceFactory
 
Constructor Summary
protected VirtualResource(ResourceFactory factory, Resource<?> parent)
           
 
Method Summary
 Resource<T> createFrom(T resource)
          Create a new resource instance for the target resource reference of the type that this current resource is.
 boolean exists()
          Return true if this Resource exists, return false if not.
 Resource<?> getChild(String name)
          Get a child of this resource.
 InputStream getResourceInputStream()
          Get the InputStream represented by this Resource.
 
Methods inherited from class org.jboss.forge.resource.AbstractResource
doListResources, equals, getFullyQualifiedName, getParent, getResourceFactory, hashCode, listResources, listResources, reify, supports
 
Methods inherited from class org.jboss.forge.facets.AbstractFaceted
getFacet, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, uninstall
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.forge.resource.Resource
delete, delete, getName, getUnderlyingResourceObject
 
Methods inherited from interface org.jboss.forge.facets.Faceted
getFacet, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, uninstall
 

Constructor Detail

VirtualResource

protected VirtualResource(ResourceFactory factory,
                          Resource<?> parent)
Method Detail

getChild

public Resource<?> getChild(String name)
Description copied from interface: Resource
Get a child of this resource. Returns null if no child by the given name can be found.


createFrom

public Resource<T> createFrom(T resource)
Description copied from interface: Resource
Create a new resource instance for the target resource reference of the type that this current resource is.

Parameters:
resource - The target reference to create the resource instance from.
Returns:
A new resource.

getResourceInputStream

public InputStream getResourceInputStream()
Description copied from interface: Resource
Get the InputStream represented by this Resource.


exists

public boolean exists()
Description copied from interface: Resource
Return true if this Resource exists, return false if not.


Forge - Resource Addon API 2.0.0.Alpha3

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.