org.progeeks.meta.type
Class FileType

java.lang.Object
  extended by org.progeeks.meta.ClassPropertyType
      extended by org.progeeks.meta.type.FileType
All Implemented Interfaces:
java.io.Serializable, PropertyType
Direct Known Subclasses:
DirectoryType, FilteredFileType

public class FileType
extends ClassPropertyType

Property type implementation that represents a File. The FileType contains additional information about the type of access or requirements that can be placed on the property of this type.

Version:
$Revision: 1.4 $
Author:
Paul Speed
See Also:
Serialized Form

Constructor Summary
FileType()
          Creates a file type representing file values that are read-only and are not directories.
FileType(boolean writable, boolean directory)
          Creates a file type representing file values with the specified restrictions.
 
Method Summary
 boolean isDirectory()
          Returns true if values of this type will only represent directories.
 boolean isInstance(java.lang.Object obj)
          Returns true if the specified object is an instance of this type.
 boolean isWritable()
          Returns true if values of this type will represent writable files.
 
Methods inherited from class org.progeeks.meta.ClassPropertyType
convertPrimitive, createRawSuperTypeIterator, equals, getBaseClass, getSuperTypes, hashCode, isAssignableFrom, toString, wrapRawSuperType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileType

public FileType(boolean writable,
                boolean directory)
Creates a file type representing file values with the specified restrictions.


FileType

public FileType()
Creates a file type representing file values that are read-only and are not directories.

Method Detail

isDirectory

public boolean isDirectory()
Returns true if values of this type will only represent directories.


isWritable

public boolean isWritable()
Returns true if values of this type will represent writable files. Generally, this setting may be ignored when isDirectory() returns true.


isInstance

public boolean isInstance(java.lang.Object obj)
Returns true if the specified object is an instance of this type.

Specified by:
isInstance in interface PropertyType
Overrides:
isInstance in class ClassPropertyType


Copyright © 2002-2003 Paul Speed. All Rights Reserved.