org.acmsl.antmake
Class ConfigureInTemplateGenerator

java.lang.Object
  |
  +--org.acmsl.antmake.ConfigureInTemplateGenerator
All Implemented Interfaces:
ConfigureInTemplateFactory

public class ConfigureInTemplateGenerator
extends java.lang.Object
implements ConfigureInTemplateFactory

Is able to generate configure.in templates.

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

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

Constructor Detail

ConfigureInTemplateGenerator

protected ConfigureInTemplateGenerator()
Protected constructor to avoid accidental instantiation.

Method Detail

setReference

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

Returns:
such instance.

createConfigureInTemplate

public ConfigureInTemplate createConfigureInTemplate(java.lang.String projectName,
                                                     java.lang.String projectVersion)
Generates a configure.in template.

Specified by:
createConfigureInTemplate in interface ConfigureInTemplateFactory
Parameters:
projectName - the project name.
projectVersion - the project version.
Returns:
a template of such kind.

write

public void write(ConfigureInTemplate template,
                  java.io.File outputDir,
                  org.apache.tools.ant.Task task)
           throws AntMakeException
Writes a configure.in 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.