org.naftulin.classpathexplorer
Interface AccessibleResource

All Known Implementing Classes:
AccessibleArchive

public interface AccessibleResource

Represents an accessible resource: its location, last modified time, etc.

Version:
1.0
Author:
henry naftulin

Method Summary
 AccessibleArchive getArchive()
          Returns the archive the resource is located in.
 java.lang.String getFullPath()
          Returns the path for the resource.
 java.lang.String getKey()
          Returns a key for the resource.
 long getLastModified()
          Returns the last modified Date as long
 java.lang.String getName()
          Returns the name of the resource.
 java.lang.String getPath()
          Returns the path for the resource.
 java.lang.String toString()
          Returns the string representation of the resource.
 java.lang.String toXml()
          Returns the xml representation of the resource.
 

Method Detail

getKey

public java.lang.String getKey()
Returns a key for the resource. Key is used for resource registry to recognize dublicate resources. For archives it's a path (with the name of the archive). For files it's the path of the file within an archive and the file name.

Returns:
a key identifying a resource.

getArchive

public AccessibleArchive getArchive()
Returns the archive the resource is located in.

Returns:
the archive the resource is located in.

getFullPath

public java.lang.String getFullPath()
Returns the path for the resource. If resource resides in an archive, (e.g. zip or jar) path represents a full path: path to the archive and path of the resource within an archive.

Returns:
the path for the resource.

getLastModified

public long getLastModified()
Returns the last modified Date as long

Returns:
the last modified Date as long

getName

public java.lang.String getName()
Returns the name of the resource.

Returns:
the name of the resource.

getPath

public java.lang.String getPath()
Returns the path for the resource. If resource resides in an archive, (e.g. zip or jar) path represents a path of the resource within an archive.

Returns:
the path for the resource.

toString

public java.lang.String toString()
Returns the string representation of the resource.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the resource.

toXml

public java.lang.String toXml()
Returns the xml representation of the resource.

Returns:
the xml representation of the resource.


Copyright © 2006 Henry Naftulin. All Rights Reserved.