org.eclipse.core.internal.resources
Class ResourceProxy

java.lang.Object
  extended by org.eclipse.core.internal.resources.ResourceProxy
All Implemented Interfaces:
ICoreConstants, IResourceProxy

public class ResourceProxy
extends java.lang.Object
implements IResourceProxy, ICoreConstants

Implements a resource proxy given a path requestor and the resource info of the resource currently being visited.


Field Summary
 
Fields inherited from interface org.eclipse.core.internal.resources.ICoreConstants
CRASH_DETECTED, EMPTY_FILE_STATES, EMPTY_PROJECT_ARRAY, EMPTY_RESOURCE_ARRAY, I_NULL_SYNC_INFO, K_BUILD_LIST, M_CHILDREN_UNKNOWN, M_CONTENT_CACHE, M_DEFAULT_CONTENT_DESCRIPTION, M_DERIVED, M_HIDDEN, M_LINK, M_LOCAL_EXISTS, M_MARKERS_SNAP_DIRTY, M_NO_CONTENT_DESCRIPTION, M_OPEN, M_PHANTOM, M_SYNCINFO_SNAP_DIRTY, M_TEAM_PRIVATE_MEMBER, M_TYPE, M_TYPE_START, M_USED, MINIMUM_FILE_SEGMENT_LENGTH, MINIMUM_FOLDER_SEGMENT_LENGTH, NULL_FLAG, PREF_VERSION, PREF_VERSION_KEY, PROJECT_SEGMENT_LENGTH, REFRESH_ON_STARTUP, WORKSPACE_TREE_VERSION_1, WORKSPACE_TREE_VERSION_2
 
Constructor Summary
ResourceProxy()
           
 
Method Summary
 long getModificationStamp()
          Returns the modification stamp of the resource being visited.
 java.lang.String getName()
          Returns the simple name of the resource being visited.
 java.lang.Object getSessionProperty(org.eclipse.core.runtime.QualifiedName key)
          Returns the value of the session property of the resource being visited, identified by the given key.
 int getType()
          Returns the type of the resource being visited.
 boolean isAccessible()
          Returns whether the resource being visited is accessible.
 boolean isDerived()
          Returns whether the resource being visited is derived.
 boolean isHidden()
          Returns whether the resource being visited is a hidden resource.
 boolean isLinked()
          Returns whether the resource being visited is a linked resource.
 boolean isPhantom()
          Returns whether the resource being visited is a phantom resource.
 boolean isTeamPrivateMember()
          Returns whether the resource being visited is a team private member.
 org.eclipse.core.runtime.IPath requestFullPath()
          Returns the full workspace path of the resource being visited.
 IResource requestResource()
          Returns the handle of the resource being visited.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceProxy

public ResourceProxy()
Method Detail

getModificationStamp

public long getModificationStamp()
Description copied from interface: IResourceProxy
Returns the modification stamp of the resource being visited.

Specified by:
getModificationStamp in interface IResourceProxy
Returns:
the modification stamp, or NULL_STAMP if the resource either does not exist or exists as a closed project
See Also:
IResourceProxy.getModificationStamp()

getName

public java.lang.String getName()
Description copied from interface: IResourceProxy
Returns the simple name of the resource being visited.

Specified by:
getName in interface IResourceProxy
Returns:
the name of the resource
See Also:
IResource.getName()

getSessionProperty

public java.lang.Object getSessionProperty(org.eclipse.core.runtime.QualifiedName key)
Description copied from interface: IResourceProxy
Returns the value of the session property of the resource being visited, identified by the given key. Returns null if this resource has no such property.

Note that this method can return an out of date property value, or a value that no longer exists, if session properties are being modified concurrently with the resource visit.

Specified by:
getSessionProperty in interface IResourceProxy
Parameters:
key - the qualified name of the property
Returns:
the string value of the session property, or null if the resource has no such property
See Also:
IResource.getSessionProperty(QualifiedName)

getType

public int getType()
Description copied from interface: IResourceProxy
Returns the type of the resource being visited.

Specified by:
getType in interface IResourceProxy
Returns:
the resource type
See Also:
IResource.getType()

isAccessible

public boolean isAccessible()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is accessible.

Specified by:
isAccessible in interface IResourceProxy
Returns:
true if the resource is accessible, and false otherwise
See Also:
IResourceProxy.isAccessible()

isDerived

public boolean isDerived()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is derived.

Specified by:
isDerived in interface IResourceProxy
Returns:
true if the resource is marked as derived, and false otherwise
See Also:
IResourceProxy.isDerived()

isLinked

public boolean isLinked()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is a linked resource.

Specified by:
isLinked in interface IResourceProxy
Returns:
true if the resource is linked, and false otherwise
See Also:
IResourceProxy.isLinked()

isPhantom

public boolean isPhantom()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is a phantom resource.

Specified by:
isPhantom in interface IResourceProxy
Returns:
true if the resource is a phantom resource, and false otherwise
See Also:
IResourceProxy.isPhantom()

isTeamPrivateMember

public boolean isTeamPrivateMember()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is a team private member.

Specified by:
isTeamPrivateMember in interface IResourceProxy
Returns:
true if the resource is a team private member, and false otherwise
See Also:
IResourceProxy.isTeamPrivateMember()

isHidden

public boolean isHidden()
Description copied from interface: IResourceProxy
Returns whether the resource being visited is a hidden resource.

Specified by:
isHidden in interface IResourceProxy
Returns:
true if the resource is a hidden resource, and false otherwise
See Also:
IResourceProxy.isHidden()

requestFullPath

public org.eclipse.core.runtime.IPath requestFullPath()
Description copied from interface: IResourceProxy
Returns the full workspace path of the resource being visited.

Note that this is not a "free" proxy operation. This method will generally cause a path object to be created. For an optimal visitor, only call this method when absolutely necessary. Note that the simple resource name can be obtained from the proxy with no cost.

Specified by:
requestFullPath in interface IResourceProxy
Returns:
the full path of the resource
See Also:
IResourceProxy.requestFullPath()

requestResource

public IResource requestResource()
Description copied from interface: IResourceProxy
Returns the handle of the resource being visited.

Note that this is not a "free" proxy operation. This method will generally cause both a path object and a resource object to be created. For an optimal visitor, only call this method when absolutely necessary. Note that the simple resource name can be obtained from the proxy with no cost, and the full path of the resource can be obtained through the proxy with smaller cost.

Specified by:
requestResource in interface IResourceProxy
Returns:
the resource handle
See Also:
IResourceProxy.requestResource()