es.uned.compiler.code
Class FinalCodeFactory

java.lang.Object
  extended by es.uned.compiler.code.FinalCodeFactory
All Implemented Interfaces:
FinalCodeFactoryIF

public class FinalCodeFactory
extends java.lang.Object
implements FinalCodeFactoryIF

Clase que genera el fichero con el código final a partir de una lista de cuartetos


Constructor Summary
FinalCodeFactory()
          Constructor for FinalCodeFactory.
FinalCodeFactory(java.io.File file)
          Constructor for FinalCodeFactory.
FinalCodeFactory(java.io.File file, ExecutionEnvironmentIF environment)
          Constructor for FinalCodeFactory.
 
Method Summary
 void create(java.util.List intermediateCode)
          Creates the final code and serializes to the file.
 ExecutionEnvironmentIF getEnvironment()
          Returns the environment.
 java.io.File getFile()
          Returns the file.
 void setEnvironment(ExecutionEnvironmentIF environment)
          Sets The environment.
 void setFile(java.io.File file)
          Sets The file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalCodeFactory

public FinalCodeFactory()
Constructor for FinalCodeFactory.


FinalCodeFactory

public FinalCodeFactory(java.io.File file)
Constructor for FinalCodeFactory.

Parameters:
file - The final code file.

FinalCodeFactory

public FinalCodeFactory(java.io.File file,
                        ExecutionEnvironmentIF environment)
Constructor for FinalCodeFactory.

Parameters:
file - The final code file.
environment - The target environment.
Method Detail

create

public void create(java.util.List intermediateCode)
            throws java.io.IOException
Creates the final code and serializes to the file.

Specified by:
create in interface FinalCodeFactoryIF
Parameters:
intermediateCode - The intermediateCode.
Throws:
java.io.IOException - Thrown when an IO Error occurs.

getEnvironment

public ExecutionEnvironmentIF getEnvironment()
Returns the environment.

Specified by:
getEnvironment in interface FinalCodeFactoryIF
Returns:
Returns the environment.

getFile

public java.io.File getFile()
Returns the file.

Specified by:
getFile in interface FinalCodeFactoryIF
Returns:
Returns the file.

setEnvironment

public void setEnvironment(ExecutionEnvironmentIF environment)
Sets The environment.

Specified by:
setEnvironment in interface FinalCodeFactoryIF
Parameters:
environment - The environment to set.

setFile

public void setFile(java.io.File file)
Sets The file.

Specified by:
setFile in interface FinalCodeFactoryIF
Parameters:
file - The file to set.