|
Forge - Parent 1.1.2-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.forge.resources.AbstractResource<T>
org.jboss.forge.resources.VirtualResource<T>
org.jboss.forge.resources.java.JavaMemberResource<Field<? extends JavaSource<?>>>
org.jboss.forge.resources.java.JavaFieldResource
public class JavaFieldResource
Field Summary |
---|
Fields inherited from class org.jboss.forge.resources.AbstractResource |
---|
flags, parent, resourceFactory |
Constructor Summary | |
---|---|
JavaFieldResource(JavaResource parent,
Field<? extends JavaSource<?>> field)
|
Method Summary | |
---|---|
Resource<Field<? extends JavaSource<?>>> |
createFrom(Field<? extends JavaSource<?>> file)
Create a new resource instance for the target resource reference of the type that this current resource is. |
boolean |
delete()
Delete this resource, return true if successful, false if not. |
boolean |
delete(boolean recursive)
Delete this resource, return true if successful, false if not. |
protected List<Resource<?>> |
doListResources()
Strategy method for returning child resources. |
String |
getName()
Return the common name of the resource. |
List<Resource<?>> |
getOptionalResources()
Returns a List of additional Resource instances. |
List<Resource<?>> |
getResources()
Returns a List of additional Resource instances. |
Field<? extends JavaSource<?>> |
getUnderlyingResourceObject()
Get the underlying object represented by this Resource |
String |
toString()
|
Methods inherited from class org.jboss.forge.resources.VirtualResource |
---|
exists, getChild, getResourceInputStream |
Methods inherited from class org.jboss.forge.resources.AbstractResource |
---|
equals, getFlags, getFullyQualifiedName, getParent, getResourceFactory, hashCode, isFlagSet, listResources, listResources, reify, setFlag, unsetFlag |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JavaFieldResource(JavaResource parent, Field<? extends JavaSource<?>> field)
Method Detail |
---|
public Resource<Field<? extends JavaSource<?>>> createFrom(Field<? extends JavaSource<?>> file)
Resource
createFrom
in interface Resource<Field<? extends JavaSource<?>>>
createFrom
in class JavaMemberResource<Field<? extends JavaSource<?>>>
file
- The target reference to create the resource instance from.
protected List<Resource<?>> doListResources()
AbstractResource
doListResources
in class JavaMemberResource<Field<? extends JavaSource<?>>>
public Field<? extends JavaSource<?>> getUnderlyingResourceObject()
Resource
Resource
getUnderlyingResourceObject
in interface Resource<Field<? extends JavaSource<?>>>
getUnderlyingResourceObject
in class JavaMemberResource<Field<? extends JavaSource<?>>>
public String getName()
Resource
getName
in interface Resource<Field<? extends JavaSource<?>>>
getName
in class JavaMemberResource<Field<? extends JavaSource<?>>>
public String toString()
toString
in class JavaMemberResource<Field<? extends JavaSource<?>>>
public boolean delete() throws UnsupportedOperationException
Resource
delete
in interface Resource<Field<? extends JavaSource<?>>>
UnsupportedOperationException
- if deleting is not supported by the underlying implementation.public boolean delete(boolean recursive) throws UnsupportedOperationException
Resource
delete
in interface Resource<Field<? extends JavaSource<?>>>
recursive
- if false and this resource both supports recursive deletion and contains children, deletion will
not occur; otherwise, if true, deletion will propagate to all child resources. Implementations may
choose simply to delegate to Resource.delete()
UnsupportedOperationException
- if deleting is not supported by the underlying implementation.public List<Resource<?>> getResources()
DeletionAware
List
of additional Resource
instances. These resources do not require user confirmation
before deletion.
getResources
in interface DeletionAware
public List<Resource<?>> getOptionalResources()
DeletionAware
List
of additional Resource
instances. These resources require user confirmation before
deletion.
getOptionalResources
in interface DeletionAware
|
Forge - Parent 1.1.2-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |