org.acmsl.antmake
Class MakeRulesTemplateGenerator

java.lang.Object
  |
  +--org.acmsl.antmake.MakeRulesTemplateGenerator
All Implemented Interfaces:
MakeRulesTemplateFactory

public class MakeRulesTemplateGenerator
extends java.lang.Object
implements MakeRulesTemplateFactory

Is able to generate Make-rules templates.

Version:
$Revision: 1.2 $
Author:
Jose San Leandro

Constructor Summary
protected MakeRulesTemplateGenerator()
          Protected constructor to avoid accidental instantiation.
 
Method Summary
 MakeRulesTemplate createMakeRulesTemplate(java.lang.String projectName)
          Generates a Make-rules template.
static MakeRulesTemplateGenerator getInstance()
          Retrieves a MakeRulesTemplateGenerator instance.
protected static java.lang.ref.WeakReference getReference()
          Retrieves the weak reference.
protected static void setReference(MakeRulesTemplateGenerator generator)
          Specifies a new weak reference.
 void write(MakeRulesTemplate template, java.io.File outputDir, org.apache.tools.ant.Task task)
          Writes a Make-rules file to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakeRulesTemplateGenerator

protected MakeRulesTemplateGenerator()
Protected constructor to avoid accidental instantiation.

Method Detail

setReference

protected static void setReference(MakeRulesTemplateGenerator generator)
Specifies a new weak reference.

Parameters:
generator - the generator instance to use.

getReference

protected static java.lang.ref.WeakReference getReference()
Retrieves the weak reference.

Returns:
such reference.

getInstance

public static MakeRulesTemplateGenerator getInstance()
Retrieves a MakeRulesTemplateGenerator instance.

Returns:
such instance.

createMakeRulesTemplate

public MakeRulesTemplate createMakeRulesTemplate(java.lang.String projectName)
Generates a Make-rules template.

Specified by:
createMakeRulesTemplate in interface MakeRulesTemplateFactory
Parameters:
projectName - the project name.
Returns:
a template of such kind.

write

public void write(MakeRulesTemplate template,
                  java.io.File outputDir,
                  org.apache.tools.ant.Task task)
           throws AntMakeException
Writes a Make-rules file to disk.

Parameters:
template - the template to write.
outputDir - the output folder.
task - the task (for logging purposes).
Throws:
AntMakeException - if the file cannot be created.


Copyright © 2004 ACM S.L.. All Rights Reserved.