org.jbind.xml.schema.compiler
Class FileInfo

java.lang.Object
  extended byorg.jbind.xml.schema.compiler.FileInfo
All Implemented Interfaces:
IFileInfo

public class FileInfo
extends java.lang.Object
implements IFileInfo


Constructor Summary
FileInfo(IComponent aComponent, ICartridge aCartridge, java.lang.String aGeneratedCode, java.lang.String aFileNameExtension)
           
 
Method Summary
 IComponent getComponent()
          Gets the component for which this file info was created.
 java.io.File getDestinationDir(java.io.File aRootDir)
          Gets the directory of the file of the generated code.
 java.io.File getDestinationFile(java.io.File aRootDir)
          Gets the file name for the generated code.
 java.lang.String getGeneratedCode()
          Gets the generated code.
 boolean isUpToDate(java.io.Reader aReader)
          Checks if previous code is up to date.
 void output(java.io.File aRootDir, IConstraintViolations aViolations)
           
 void output(java.lang.String aRootDir, IConstraintViolations aViolations)
           
 boolean overwrite()
          Determines if any previous code is overwritten.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileInfo

public FileInfo(IComponent aComponent,
                ICartridge aCartridge,
                java.lang.String aGeneratedCode,
                java.lang.String aFileNameExtension)
Method Detail

getComponent

public IComponent getComponent()
Description copied from interface: IFileInfo
Gets the component for which this file info was created.

Specified by:
getComponent in interface IFileInfo
Returns:
(required).

getGeneratedCode

public java.lang.String getGeneratedCode()
Description copied from interface: IFileInfo
Gets the generated code. If null is returned then no file is be generated.

Specified by:
getGeneratedCode in interface IFileInfo
Returns:
(optional).

getDestinationFile

public java.io.File getDestinationFile(java.io.File aRootDir)
Description copied from interface: IFileInfo
Gets the file name for the generated code.

Specified by:
getDestinationFile in interface IFileInfo
Parameters:
aRootDir - (required).
Returns:
(required).

getDestinationDir

public java.io.File getDestinationDir(java.io.File aRootDir)
Description copied from interface: IFileInfo
Gets the directory of the file of the generated code.

Specified by:
getDestinationDir in interface IFileInfo

overwrite

public final boolean overwrite()
Description copied from interface: IFileInfo
Determines if any previous code is overwritten.

Specified by:
overwrite in interface IFileInfo
Returns:
Returns true iff previous code is overwritten.

isUpToDate

public final boolean isUpToDate(java.io.Reader aReader)
                         throws java.lang.Exception
Description copied from interface: IFileInfo
Checks if previous code is up to date.

Specified by:
isUpToDate in interface IFileInfo
Returns:
Returns true iff the previous code is up to date.
Throws:
java.lang.Exception

output

public void output(java.lang.String aRootDir,
                   IConstraintViolations aViolations)
Specified by:
output in interface IFileInfo

output

public void output(java.io.File aRootDir,
                   IConstraintViolations aViolations)
Specified by:
output in interface IFileInfo