## org.eclipse.wst.server.core.util
Class ModuleFile

    java.lang.Object
      org.eclipse.wst.server.core.util.ModuleFile

All Implemented Interfaces:
  IModuleFile, IModuleResource

    public class ModuleFile

extends java.lang.Object
implements IModuleFile

An implementation of `IModuleFile` for physical files on disk or in the workspace.

Since:
  3.0

Constructor Summary
`ModuleFile(java.io.File file, java.lang.String name, IPath path)` Creates an external module file with the current modification stamp.
`ModuleFile(IFile file, java.lang.String name, IPath path)` Creates a workspace module file with the current modification stamp.
`ModuleFile(IFile file, java.lang.String name, IPath path, long stamp)` Deprecated. use one of the top two constructors instead
`ModuleFile(java.lang.String name, IPath path, long stamp)` Creates a module file with a specific modification stamp and no file reference.

Method Summary
`boolean` `equals(java.lang.Object obj)`
`java.lang.Object` `getAdapter(java.lang.Class cl)`
`long` `getModificationStamp()` Returns a modification stamp.
`IPath` `getModuleRelativePath()` Returns the module relative path to this resource.
`java.lang.String` `getName()` Returns the name of this resource.
`int` `hashCode()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ModuleFile

    public ModuleFile(IFile file,
                      java.lang.String name,
                      IPath path)

  Creates a workspace module file with the current modification stamp.

  Parameters:
    `file` - a file in the workspace
    `name` - a name
    `path` - the path to the file

### ModuleFile

    public ModuleFile(java.io.File file,
                      java.lang.String name,
                      IPath path)

  Creates an external module file with the current modification stamp.

  Parameters:
    `file` -
    `name` -
    `path` -

### ModuleFile

    public ModuleFile(java.lang.String name,
                      IPath path,
                      long stamp)

  Creates a module file with a specific modification stamp and no file reference.

  Parameters:
    `name` -
    `path` -
    `stamp` -

### ModuleFile

    public ModuleFile(IFile file,
                      java.lang.String name,
                      IPath path,
                      long stamp)

  Deprecated. use one of the top two constructors instead

  Creates a workspace module file with a specific modification stamp.

  Parameters:
    `file` -
    `name` -
    `path` -
    `stamp` -

Method Detail

### getModificationStamp

    public long getModificationStamp()

  Description copied from interface: `IModuleFile`
  Returns a modification stamp. Whenever the modification stamp changes, there may have been a change to the file.

  Specified by:
    `getModificationStamp` in interface `IModuleFile`
  Returns:
    the modification stamp

### getModuleRelativePath

    public IPath getModuleRelativePath()

  Description copied from interface: `IModuleResource`
  Returns the module relative path to this resource.

  Specified by:
    `getModuleRelativePath` in interface `IModuleResource`
  Returns:
    the module relative path to this resource

### getName

    public java.lang.String getName()

  Description copied from interface: `IModuleResource`
  Returns the name of this resource.

  Specified by:
    `getName` in interface `IModuleResource`
  Returns:
    the name of this resource

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### getAdapter

    public java.lang.Object getAdapter(java.lang.Class cl)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`