Forge - Parent 1.2.3-SNAPSHOT

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

java.lang.Object
  extended by org.jboss.forge.resources.AbstractResource<T>
      extended by org.jboss.forge.resources.VirtualResource<T>
All Implemented Interfaces:
Resource<T>
Direct Known Subclasses:
EntryResource, EnumConstantResource, JavaMemberResource, MavenDependencyResource, MavenProfileResource, MavenRepositoryResource

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

Author:
Lincoln Baxter, III

Field Summary
 
Fields inherited from class org.jboss.forge.resources.AbstractResource
flags, parent, resourceFactory
 
Constructor Summary
protected VirtualResource(Resource<?> parent)
           
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.resources.AbstractResource
doListResources, equals, getFlags, getFullyQualifiedName, getParent, getResourceFactory, hashCode, isFlagSet, listResources, listResources, reify, setFlag, unsetFlag
 
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
delete, delete, getName, getUnderlyingResourceObject
 

Constructor Detail

VirtualResource

protected VirtualResource(Resource<?> parent)

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 - Parent 1.2.3-SNAPSHOT

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