org.acmsl.antmake
Class TopMakefileAmTemplateGenerator

java.lang.Object
  |
  +--org.acmsl.antmake.TopMakefileAmTemplateGenerator
All Implemented Interfaces:
TopMakefileAmTemplateFactory

public class TopMakefileAmTemplateGenerator
extends java.lang.Object
implements TopMakefileAmTemplateFactory

Is able to generate top-level Makefile.am templates.

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

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

Constructor Detail

TopMakefileAmTemplateGenerator

protected TopMakefileAmTemplateGenerator()
Protected constructor to avoid accidental instantiation.

Method Detail

setReference

protected static void setReference(TopMakefileAmTemplateGenerator 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 TopMakefileAmTemplateGenerator getInstance()
Retrieves a TopMakefileAmTemplateGenerator instance.

Returns:
such instance.

createTopMakefileAmTemplate

public TopMakefileAmTemplate createTopMakefileAmTemplate(java.lang.String projectName)
Generates a top-level Makefile.am template.

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

write

public void write(TopMakefileAmTemplate template,
                  java.io.File outputDir,
                  org.apache.tools.ant.Task task)
           throws AntMakeException
Writes a top-level Makefile.am 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.